Jump to content

A new user question


Merle

Recommended Posts

Hi All,

 

I apologize in advance for the simplicity of this question, but I'm really scratching my head on it.

I'm using the latest version of UniLogic with a UniStream PLC+HMI device.  I have some very simple ladder that I can't seem to get  to run for some reason?  I'm using a single Digital Input to simulate a button press and a single Digital output to simulate an output switch (to drive a relay or something).

My IO are mapped as follows on input_0 and output_0:

image.png.ca21df8037c832d7c1381c89dd1b2b20.png

 

And I'm trying to get the simple ladder below to execute.  I'm just trying to press a button and turn on an output.  Seems basic enough, but I can't get it to work.  In Online mode in UniLogic, I can see the "I Button" contact get powered when the button is pressed, but nothing happens? 

image.png.623c158752bd1f967003452d7dc821fc.png

Execution just seems to stop - even when the Button contact is directly wired to the Output coil as in Rung 2.

image.png.73b6521d52a44ac33bcf5c1a1e3f5335.png

What am I doing wrong?

 

Link to comment
Share on other sites

Possible Cause 1:  the CPU might be in STOP mode, not RUN. You can check/change the status using UniApps | System | Control.

                                          you can also use Unilogic to change the run/stop status of the PLC using "PLC Control", under "Unistream Management" on the PLC tab of the ribbon.

Possible Cause 2: you may have your ladder logic in a function, other than the Main function, that is not being called. If this is the case, you will get a warning when you compile/download your project.

 

Link to comment
Share on other sites

  • MVP 2023

One other item of note, you appear to have multiple identical Direct Coils in your program. This is a no-no. I don't think this is the cause of your problem because "last rung wins" and the fact that it's being turned off in rung 1 should not keep it from being turned back on in rung 2.

  • Like 1
Link to comment
Share on other sites

22 minutes ago, Flex727 said:

One other item of note, you appear to have multiple identical Direct Coils in your program. This is a no-no. I don't think this is the cause of your problem because "last rung wins" and the fact that it's being turned off in rung 1 should not keep it from being turned back on in rung 2.

Yes understood.  I've tried running with either or rung disabled with same result.  Just trying to get ANYTHING to work.  :)

Link to comment
Share on other sites

1 hour ago, Dave said:

Possible Cause 1:  the CPU might be in STOP mode, not RUN. You can check/change the status using UniApps | System | Control.

                                          you can also use Unilogic to change the run/stop status of the PLC using "PLC Control", under "Unistream Management" on the PLC tab of the ribbon.

Possible Cause 2: you may have your ladder logic in a function, other than the Main function, that is not being called. If this is the case, you will get a warning when you compile/download your project.

 

 

CPU was running, however, I did have a couple issues:

1.  As you suggested, I didn't have my main ladder function set to run as Main (fixed by right clicking on it).

2. I also have my IO defined in a separate ladder function, but I didn't have it called in my Main function.

It all made sense when I realized what the error messages were telling me based on your suggestion.  Lesson learned.

The ladder appears to be running properly now in Online mode.  However, I'm still not getting anything on the actual output pin?  Some other issue probably.

Thank you.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.