I'm using MotionWorks IEC Pro to write a Function Block program. There is also an HMI that needs to interact with this bit of programming. This is my first machine and program so I am somewhat of a novice at this. I spent most of today trying to solve this problem and have not come up with a fully working solution.
I have a string of function blocks with an NC contact in the middle. I need to be able to open the contact to interrupt the FB string by either of two methods:
I can make either Method work by itself, but I am having trouble making both methods work together with a common button and status indicator. I'd like the status indicator to read from the NC contact that interrupts the FB string.
I have been using ladder logic to try to solve this problem, and have been having trouble. Not sure whether to use a toggle or momentary switch on the HMI. Seeing as the toggle is done at the HMI it might make more sense to use a momentary and accomplish the toggling with the ladder logic, and therein lies my trouble.
As I am inexperienced at this, it is entirely possible that there's a simple function block, unknown to me, that will solve this same problem and I can skip the Ladder entirely.
I'd appreciate any input on this, I have a feeling the solution is simpler than I am making it out to be.
I have a string of function blocks with an NC contact in the middle. I need to be able to open the contact to interrupt the FB string by either of two methods:
Method 1
Method 2
There is a bit of FB logic that makes variable comparisons and sets a variable to TRUE if certain conditions are met. TRUE opens the contact and interrupts the string. TRUE also lights the indicator on the HMI button. The operator checks the part and then presses the button on the HMI to close the contact and continue the program
Method 2
The same button on the HMI can also be pressed by the operator to open the NC contact. The operator will then check the part and press the button a second time to close the contact and continue the program. I have the option of setting the button up as either a toggle or a momentary button. The button lights up when the contact is open. I can read and write at the same address or read and write from different addresses.
I can make either Method work by itself, but I am having trouble making both methods work together with a common button and status indicator. I'd like the status indicator to read from the NC contact that interrupts the FB string.
I have been using ladder logic to try to solve this problem, and have been having trouble. Not sure whether to use a toggle or momentary switch on the HMI. Seeing as the toggle is done at the HMI it might make more sense to use a momentary and accomplish the toggling with the ladder logic, and therein lies my trouble.
As I am inexperienced at this, it is entirely possible that there's a simple function block, unknown to me, that will solve this same problem and I can skip the Ladder entirely.
I'd appreciate any input on this, I have a feeling the solution is simpler than I am making it out to be.
Last edited: