
adccommunitymod (AutomationDirect) asked a question.
Created Date: July 25,2012
Created By: jimbtv
**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****
I have a simple program running on an 05 that changes a stacklight from green to yellow to red every time X0 is triggered. Pushing X0 one more time starts the sequence over again. This is performed by incrementing a counter with X0 then checking the value of K on every pass. K1 turns on Y0 (green), K2 = Y1 (yellow) and K3 = Y2 (red). The customer now want to add another input that will set Y2 (red) on using X1. If I directly set Y2 to follow X1 I am concerned that the lights will still find what remains in K and light both the previous K-value and the latched Y2 (red) on every pass of the program. My thought would be to have X1 load the CT0 (V1000) with K=3 but I cannot find a way to do this. How can I push a value to V1000 without incrementation? Jim - Novice in Ladder Logic but a Fairly Decent Programmer
Created Date: July 25,2012
Created by: bcarlton
STR X1
LD K3
OUT V1000
The 'OUT ' command is entered by typing 'OUT ' then Enter then press '/ '. This will change the 'OUT ' from the contact type to the word type.
This is one of thos great 'gotcha ' features of DirectSoft.
Created Date: July 25,2012
Created by: jimbtv
It all seems so simple but I have struggled for hours to find that solution.
Thank you so much for your help.
Jim
Created Date: July 25,2012
Created by: bcarlton
If you use the Instruction Browser under 'Box ' you'll get the correct 'OUT ' instead of the one under 'Coil ' but that takes a lot more mouse clicks. It's better to know how to use the keyboard. By the way, the '/ ' wil switch a contact between Normally Open and Normally Closed. It will also cycle between the different numeric comparison instructions.
Created Date: July 25,2012
Created by: jimbtv
I have a simple program running on an 05 that changes a stacklight from green to yellow to red every time X0 is triggered. Pushing X0 one more time starts the sequence over again. This is performed by incrementing a counter with X0 then checking the value of K on every pass. K1 turns on Y0 (green), K2 = Y1 (yellow) and K3 = Y2 (red).
The customer now want to add another input that will set Y2 (red) on using X1. If I directly set Y2 to follow X1 I am concerned that the lights will still find what remains in K and light both the previous K-value and the latched Y2 (red) on every pass of the program. My thought would be to have X1 load the CT0 (V1000) with K=3 but I cannot find a way to do this.
How can I push a value to V1000 without incrementation?
Jim - Novice in Ladder Logic but a Fairly Decent Programmer