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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...