
BE_ZERO_BE (Customer) asked a question.
Productivity Software : Cannot move data
I have a fair amount of Click PLC experience.
This is my first project with a Productivity Series PLC
I am using a P3-550E.
I am having trouble with simple data move commands.
Below is a three rung program that does not do what I expect it to.
PASSWORD (US16) does not increment.
The first COPY DATA does not move the US16 to the Float PARAM 5.
The second COPY DATA does not move PARAM 5 (F32) to Param 6 (F32)
This is the entire program.
I am sure I am making a rookie mistake of some kind.
Any guidance will be greatly appreciated.
Thanks.
Bob
Not sure what your goal might be, but try a rising edge (NOE) in the INC branch and some logic in the DEC branch of rung 3. (You may find the ticking the OneShot box int he INCDEC instruction can do what you need.)
With the (NO) 2 Second Bit int he INC branch, the INC/DEC will increment to datatype MIN [0xFF] very quickly.
With an empty DEC branch, the INC/DEC will decrement to datatype MIN [0x00] very quickly.
With both INC and DEC branches true, the instruction will not execute. (Help topic P149)
The PASSWORD tag is an unsigned 16-bit data type. This means that 0 is the lowest value. In rung 3.1, you have a level driven decrement command on PASSWORD. It may appear that your program is not executing, but if you preload a value of 65535 in PASSWORD, you will see the value decrementing during the scan loop.
I would place a Normally-Open 'Always-Off bit' in the DEC input to stop the decrement execution. Also, if you are wanting the value of PASSWORD to increment by 1 each time the INC input is true, I would enable the One-Shot function in the Inc/Dec instruction.
I hope this helps.
Since nothing is in the "Dec" subrung it will always have power flow and decrease the count by 1 each scan. THis means it will never count up as your count down is far more often. Since the inc/dec is always 0 then your copy value is always 0.
Also as others have said, use edge rising contacts so you dont copy data every scan during the 1 second the contact is on.