
ClayCPS (Customer) asked a question.
New to Click PLCs and trying to understand the issues I am having.
I have an emergency stop which is normally closed contact input to the PLC which should activate a system healthy status.
To actually drive the system healthy status in the ladder I have to put a normally open contact in the code which is opposite to what is wired. It will only then turn blue in the status monitor.
How can I flip this logic so the ladder matches the hardwiring, it get confusing having to think in opposite logic.
The second issue is with forcing analog input values.
I have DF1 as a tank level, and a comparator which should drive an output if the tank level is lower than a setpoint DF22 (0.5). If change the values of DF1 in the dataview it doesnt seem to have any effect in the status monitor. It seems buggy? I can hear relays driving but see no changes in the blue status for the comparator and the output it should be driving.
It would be handy if this option worked properly as it would save simulating the 4-20 loop with an instrument.
Any tips would be appreciated!
Clay
Hi ClayCPS,
Stop switches coming into the PLC are normally closed wiring. The PLC Contact (NO) can be thought of as examining the input for an on (1) or high condition. Similarly, the PLC Contact (NC) can be thought of as examining the input for an off (0) or low condition.
What I would usually do is put a single rung in the controller to have an internal bit turn on when the system is ready to run.
The Click does not have a force for memory registers. This can only be done for bits and is called an override.
The PLC is scanning from left to right, top to bottom. Conditions are available from the previous rung to the next. This is happening at the scan rate of the PLC. Usually less than 5 milliseconds.
When you changed the DF1 memory area this put the value into the area for one scan and update for the PLC. This is why you heard some clicking.
In order to test your logic, substitute DF100 for DF1 in your program. You will then be able to change and watch your program react. Remember to change this back to your original DF1 for the analog signal.
Here is a series on the Click PLC.
https://accautomation.ca/series/click-plc/
I hope this helps you out.
Regards,
Garry
https://accautomation.ca/programming/plc-beginners-guide/
>To actually drive the system healthy status in the ladder I have to put a normally open contact in the code which is opposite to what is wired.
I would be a good idea to break the mental connection between the field devices (ESTOP contacts) and the actual input. The program does NOT know about or care about the field devices,. It only knows about the state of the inputs.
For instance, if you had a chain of ESTOP contacts with one open contact, how would you visualize the ESTOP chain and the ESTOP input? Surely, it is not easy to think of an ESTOP chain in terms of all of the elements of the chain, but it is easy to think of the physical input's state. This is similar to what Garry was saying when he stated "examining the input for an on (1) or high condition." (sounds like Ron Beaufort <youtube link)
Adding to what has been said about the discrete input, get in the habit of assigning comments to the addresses that describe what the bit means when there's a "1" in its memory location ie. "E-Stop OKAY". Before you know it, you will be reading the ladder logic with those comments and it will make good sense to you.
For your analog, something else is writing to DF1 in the PLC program, so you might attempt to write your own value to that address and it will work until the next time the PLC program updates that register (a few milliseconds typically). For a tank fill program, I usually have a start delay and stop delay (timers) driven by compare instructions which compare the analog value to my setpoints.
Then when the level has been met or exceeded for that minimum amount of time I will latch on the output to the fill valve or pump. If there is a bump or noise on the level signal, the time delay helps to ignore it and can keep you from "short cycling" pumps or valves when there is a meaningless blip from a sensor.