What's new
What's new

Checking input Status in program with 31i Control

70olds

Aluminum
Joined
Jun 21, 2016
Is there a line of code I can use to check the status of an input on a FANUC 31i control through my program.

I.E - If input 41 is hot then.....

Thanks.
 
Only if the MTB has associated that input to a variable.

You cannot query random IO points. Just like you cannot query random parameters, if they dont have a variable address.

A good example is how Mori associated macro variable 147 to the pallet identity on a HMC.

If you wanted some type of externally triggered interrupt or jump. You do have block skip available.
 
This can be done by attaching an address to the input via a system variable, but it must be done inside the ladder. You'll need to get with the dealer as your first point of contact, unless you know how to edit ladder logic inside a Fanuc control.
 
As mentioned in the other responses, an input has to be linked in the ladder program to a system variable that can be tested by logic within a user macro.

The 31i series controls have on-board ladder editing ability. It may be an option though. Also even if the edit ability exists, it is common for the ladder to be password protected by the machine builder. There are some YouTube videos about ladder editing on Fanuc controls. If you think you want to try it and your ladder is unprotected, it would be worth watching some of those. Also download and have a read through this....

http://jamet.com/Fanuc_Web_Manuals/Prog/63983EN.pdf

Pretty much all you need will be in there....somewhere. It's a big book.
 
Thanks guys, that's a bummer. I was hoping to avoid going to that extent.

Didn't want to scare you off, just letting you know what you would need to do. The ladder rung (NET in Fanuc speak) is really simple. Forum formatting does not work so well to illustrate this but kinda like......


|
|--||---------0---|
| X41 G35.0

Then your program just tests the state of system variable #1000. When input 41 is on then #1000 = 1. When input 41 is off then #1000 = 0.
 
Didn't want to scare you off, just letting you know what you would need to do. The ladder rung (NET in Fanuc speak) is really simple.

--||---------0---
X41 G35.0

Then your program just tests the state of system variable #1000. When input 41 is on then #1000 = 1. When input 41 is off then #1000 = 0.

I appreciate that.

We were having communication errors between the barfeeder and machine. We are getting the right signals from the barfeeder for my EOB signal at the machine inside the IO boards, but for whatever reason the ladder inside the machine already is not recognizing the signal and doing the right thing. The MTB already told me that I would need to have the ladder altered, so I was hoping to just use the input as a way around it to signal the sub-program jump that I need. If we have to go to the ladder anyway then we might as well just get it fixed properly.
 
I appreciate that.

We were having communication errors between the barfeeder and machine. We are getting the right signals from the barfeeder for my EOB signal at the machine inside the IO boards, but for whatever reason the ladder inside the machine already is not recognizing the signal and doing the right thing. The MTB already told me that I would need to have the ladder altered, so I was hoping to just use the input as a way around it to signal the sub-program jump that I need. If we have to go to the ladder anyway then we might as well just get it fixed properly.


Are these repeat parts? You oughta know how many you can get out of a bar. Just use a counter to trigger your bar change?
 
Are these repeat parts? You oughta know how many you can get out of a bar. Just use a counter to trigger your bar change?

That's more or less what we do now. The barfeeder tells me a number of parts until I hit EOB. The bars are saw cut down to 4(ish) feet and we get a lot of random lengths for the last piece. In general I really just wanted to get the machine functioning seamlessly in the background with the barfeeder so I don't have to worry about someone putting a bar that's a hair shorter or longer in there and causing a problem or not setting the counter correctly. Very basic operator level.
 








 
Back
Top