Merle Posted August 15 Report Share Posted August 15 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: 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? Execution just seems to stop - even when the Button contact is directly wired to the Output coil as in Rung 2. What am I doing wrong? Quote Link to comment Share on other sites More sharing options...
Dave Posted August 15 Report Share Posted August 15 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. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted August 15 MVP 2022 Report Share Posted August 15 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. 1 Quote Link to comment Share on other sites More sharing options...
Merle Posted August 15 Author Report Share Posted August 15 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. Quote Link to comment Share on other sites More sharing options...
Merle Posted August 15 Author Report Share Posted August 15 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.