I added an input (flow switch) to an 18i control. I added a rung in the ladder like:
Code:
----| |----------------------------------( )-------
X0021.1 G54.4 #1004
I'm using it to detect flow after I turn coolant on. It works fine in the main program O0248, but when I call a different sub M98P0301, where I also want to turn on and then look for the coolant flow, it does not work (so it activates my alarm). I can see it working in the ladder, the flow is on, and I wait long enough before I look, but [#1004 NE 1] is true, so it alarms.
I thought system variables (inputs) should be visible across all macros / subs.
For now, I simply disabled the feature I wanted in O0301 (a warm-up, slow grind in the morning if the delay since last grind is more than 100 minutes)
Seems very odd that it works fine in the main, but not the sub... Any ideas? THANKS !!!