What's new
What's new

Fanuc reading a PMC input

m_ghaff2000

Plastic
Joined
Feb 25, 2020
How we can reading an input (PMC) in CNC program?
to use an input for a condition in CNC program. I want to insert a condition in my program if an input for example X0.1 is on the program call a subprogram otherwise continue the lines.
thanks
 
Since you used "PMC", I assume you are asking in regards to Fanuc controls....

Can only be done if the ladder program transfers the input signal to a user macro input bit.

Few machine builders include this in their ladder program. Depending on control model and configuration a user may be able to modify the ladder to do this. Unless you are experienced in ladder logic, this would be a job best left to an experienced tech. Incorrect modifications to the ladder could leave the machine inoperable or dangerous to operate.
 
I totally agree with Vancbiker.

Wrong move and you can mess up a lot of things.

talk to your machine supplier.
 
Instead of messing with ladder, use SKIP input to connect your signal, and G31 move to examine if it is either "1" or "0". I've done it in many cases, simple and does the job.
 
Thanks a lot
Is it possible send me an example?
best regards
If some other instrument is connected to the SKIP input, you will have to use CHANGE OVER contact of M-function operated relay in order to control what is connected.
Assuming that your device is connected to the SKIP input, you will have to use following macro routine:

YOUR PROGRAM
.
.
.
(CHECK STATUS OF YOUR DEVICE)
G91
#100=#5023
G31Z-0.01 F60
G53
#101=#5023
G0 Z[#100-#5023]
G90
IF[ABS[#100-#101]GT0.005]GOTO1000 (INPUT STATUS "0")
M98P**** (INPUT STATUS 1, CALL SUBROUTINE)
N1000
.
.
.
M30
 
Instead of messing with ladder, use SKIP input to connect your signal, and G31 move to examine if it is either "1" or "0". I've done it in many cases, simple and does the job.

Could be a problem if the OP's machine has a spindle probe or tool setter already using SKIP. One can have multiple devices inputting to SKIP, but that is best done by incorporating an M code to select devices. Of course then ones machine would have to have additional M codes provided by the machine builder ladder program.
 
Could be a problem if the OP's machine has a spindle probe or tool setter already using SKIP. One can have multiple devices inputting to SKIP, but that is best done by incorporating an M code to select devices. Of course then ones machine would have to have additional M codes provided by the machine builder ladder program.
This is quite easy. I would use the COOLANT ON signal. Whenever coolant is ON, the signal in subject is connected to SKIP, and it can be examined as explained. Whenever it is OFF, other device (probe) is connected. Probing is never executed with coolant ON.
 
You didn't mention your control model, but I think Fanuc has kept everything the same since forever. The logic you need is dead simple:

|------| |----------------( )---|
X0.1 G0054.0

Macro variable #1000 will be 0 or 1 depending on input X0.1. I would much rather add one run to the ladder than try to shoehorn the functionality into the skip signal. Doing that would work, but I prefer not to make 3 right turns when I want to go left.

The manual you want is B-64483EN-1/03.
 
Yes, way better than jury rigging the skip signal. If the OP has edit capability of the ladder the basic rung as shown might just be all he needs.

Never got a description of what the proposed use is. The logic would get more complex if he needs to latch the state of the input, filter contact bounce, have some time delay, memorize the input state in case of power failure and so on.
 
"I would much rather add one run to the ladder than try to shoehorn the functionality into the skip signal. Doing that would work, but I prefer not to make 3 right turns when I want to go left."

Yes, it would be much nicer if left turn would be available. But it is not. Under these circumstances making 3 right turns is much easier then reconstructing the road crossing structure, especially not being sure that one has skills and tools to do it.

We are living in the real world and have to give real, simple and straight forward solution to problems. There is not enough time in the field to deal with all "ifs" (if the ladder is editable, if there is free input on interface terminal etc...) The solution I gave, maybe in someone's opinion not very elegant, is simple to apply, is working and does not harm other system's functions.
 
Hi footpetaljones. I am using a macro to read the status of X13.4 and followed the instructions in your post to the letter. The problem I have is every time the update finishes the PMC goes into alarm and I have to recycle power to clear it. I have read hundreds of pages of documents regarding passing bit status to the macro and and I found in the same documents to use G0054 or G0055. I performed a global search on X13.4 and G0054.0 with no results found.Am I missing something here? any help would be deeply appreciated.

SERIES: 0i-TF
Type: A02B-0338
DATE: 2018-03
NO. 183L0439
 
Are you writing your changes to FROM?

No. Here is what I tried:

----| |-----------------( )-
X14.4 G0054.0

After pushing the update button and update completes, in the top left hand corner is a ALM in a red box. I did not save to F ROM thinking it would still be in alarm when I recycled power.

I did call Fanuc and told them what was happening and here is what they said. In order to Read/Write from macros and the PMC you have to have the "Additional Worksheet Coordinates" installed. I him the serial number of the controller and he told me the MTB did not purchase that option. Have you heard of the "Additional Worksheet Coordinates"?
 
No. Here is what I tried:

----| |-----------------( )-
X14.4 G0054.0

After pushing the update button and update completes, in the top left hand corner is a ALM in a red box. I did not save to F ROM thinking it would still be in alarm when I recycled power.

I did call Fanuc and told them what was happening and here is what they said. In order to Read/Write from macros and the PMC you have to have the "Additional Worksheet Coordinates" installed. I him the serial number of the controller and he told me the MTB did not purchase that option. Have you heard of the "Additional Worksheet Coordinates"?
SIMPLE LEFT TURN ???? !!!
Now it is not application mess only, apparently it is going to be costly too.
Use the "pretty poor hack", connect through SKIP. Easy, cheap, immediately available and works.
 
SIMPLE LEFT TURN ???? !!!
Now it is not application mess only, apparently it is going to be costly too.
Use the "pretty poor hack", connect through SKIP. Easy, cheap, immediately available and works.

I was told by my employer to get a quote.
 
No. Here is what I tried:

----| |-----------------( )-
X14.4 G0054.0

After pushing the update button and update completes, in the top left hand corner is a ALM in a red box. I did not save to F ROM thinking it would still be in alarm when I recycled power.

I did call Fanuc and told them what was happening and here is what they said. In order to Read/Write from macros and the PMC you have to have the "Additional Worksheet Coordinates" installed. I him the serial number of the controller and he told me the MTB did not purchase that option. Have you heard of the "Additional Worksheet Coordinates"?

I've never heard the term, nor is it listed in my copy of the Fanuc options manual (though that is from 2017). I called Fanuc and spoke to a John in service, and he said the "additional worksheet coordinates" was G54.1 P1 - P48. I don't see what work coordinates would have to do with macros. John couldn't find documentation of any options required for reading/writing variables through the ladder in 0i-F or 31iB5 controls, but he did think custom macro B might be needed (which is standard now, I believe)

Save the change to FROM, reboot, and check if the changes are permanent. If the alarm is still there, check what the alarm is on the PMC alarm screen.
 
I've never heard the term, nor is it listed in my copy of the Fanuc options manual (though that is from 2017). I called Fanuc and spoke to a John in service, and he said the "additional worksheet coordinates" was G54.1 P1 - P48. I don't see what work coordinates would have to do with macros. John couldn't find documentation of any options required for reading/writing variables through the ladder in 0i-F or 31iB5 controls, but he did think custom macro B might be needed (which is standard now, I believe)

Save the change to FROM, reboot, and check if the changes are permanent. If the alarm is still there, check what the alarm is on the PMC alarm screen.

I'll give it a try and let you know!
 
Please post what the alarm was. I have an alarm list for Fanuc PMC-N. This is different than the PMC in the 0i controls but Fanuc are typically good about keeping alarm numbers and descriptions similar across their models. Knowing what the alarm is may give an idea of what is going on.
 








 
Back
Top