DCD...decode

geniusintraining

Lifetime Supporting Member + Moderator
Join Date
Jun 2005
Location
SC
Posts
8,268
I have a SLC 504, Redlion G303 along with a Danfoss drive

This is the first time that I got deep in to this program (the 504), it was wrote by I very knowable programmer but….his documentation sucks and his verbiage…well, we can leave it at that.

Starting Sunday I will be making a significant change to the process, I should be ok, but I ran across something that I don’t use (in this manner) and I was wondering is it common practice?

In the Redlion he set up several data tags some go to B3:0/X and others are a integer’s, these integer’s are tags referenced as N7:20 and they are set up as states (0-7) read/write, then in the SLC he is doing a DCD from N7:20 to B3:x/x

I guess you can do this with any HMI if you only want one bit to be true at a time, I have always sent it over to the PLC as bits, so is this common? I see nothing wrong with it, but just wondering?

This is what the instructions say for the DCD for non-AB persons

DCD.gif
 
I would guess he was paranoid about more than one of the states (0-7) being true at the same time. By setting up the integer then DCD he is insuring the ONLY ONE condition.
 
Thats what I gathered also Bernie, thanks for the reply

Have you ever interlock this way yourself?
 
More tidbits

I Do but I don't have a ENC or DCD instruction to make this easy

HiPriorityAlarmBit = AlarmBits AND -AlarmBits // This provides the least significant bit and only one bit.

I then clear the alarm HiPriorityAlarmBit

AlarmBits = AlarmBits and not HiPriorityAlarmBit.

The HiPriorityAlarmBit is always the least significant AlarmBit.

Usually I use this to prioritize data transfers which may be exactly what GIT's programmer is doing.

An ENC followed by a DCD instruction would to the same thing but not as efficiently.
 

Similar Topics

Good afternoon to all Need help in understanding the purpose of a case state "decode 4 to 1 of 16" any help is greatly appreciated. Thank you
Replies
5
Views
1,623
How can I achieve the same functionality in Studio 5000? Image 001.png for the old RSLogix500 program Image 002.png for conversion to Studio...
Replies
6
Views
2,509
Hi, i'm migrating a project from Rslogix500 to logix5000 and the first error i get is that the instruction Decode (DCD) does not exist. can...
Replies
19
Views
8,982
:shoot:I am wanting to take a word and say chop up the hex value ie. word b9:0 = DCA9 send the 9 - b10:0 then A-B10:1 then C-B10:2 then...
Replies
8
Views
3,278
Hi Everyone, I am working on a project with a SLC504. I am using the DCD instruction to use 4 inputs to select 1 of 16 outputs. I have tested my...
Replies
2
Views
3,242
Back
Top Bottom