Unity Pro Subroutine Call

omdeng

Member
Join Date
Apr 2018
Location
Edmonton
Posts
2
Hi,

I am working with Unity Pro S. I have created a subroutine in SR Sections folder and in the main ladder program in Sections folder, I am calling the Subroutine using call Coil. I have added a coil in one rung in the subroutine. This coil is always set (1) no matter if the subroutine has been called or not.

Could you help me with this?

Thanks,
 
if the subroutine logic is not executed it does not change the state of the coil. What do you expect to reset the coil if the subroutine is not called?
 
It is called in the main ladder program, but the coil inside the subroutine change its state to one and stays there.
 
Our crystal balls are broke. More info (picture or unity file) would be nice. without more info it is hard to say.

But you are talking of coil on subroutine.
If you really have only coil in subroutine without any logic condition, then coil will go to "1" state as soon subroutine is executed.
And memory bits (and Words) will stay on last state as long as it is changed to different state by program, communication from elsewhere or via animation table.
Bit and words have last state if nothing is setting them to different states.
 

Similar Topics

I'm trying to document a project done in Unity Pro XL and I can't seem to figure out how to search for all the locations a subroutine is called...
Replies
0
Views
2,097
Greetings, I am new to unity pro PLC programming. I am having problem getting out of a subroutine when calling of subroutine stops. the output...
Replies
1
Views
2,600
Is it possible to call a subroutine from Ladder? Or does the call need to be in ST or FBD?
Replies
1
Views
6,096
I have a small piece of code (4 lines) that I need to repeat many times over. How do I create a subroutine with parameters? I have many...
Replies
1
Views
4,761
Hello, I am using Unity pro V15. I have Quantum CPU 671 and Ethernet NOE 77101 configured. I have configured IO scanning on NOE. I have attached...
Replies
5
Views
169
Back
Top Bottom