AB RSlogix5000

tom_ch

Member
Join Date
Sep 2005
Location
Los Angeles
Posts
1
I'm trying to set a fisical output # depending on a counter. I think it should be possible to do something like: Local:2:I.DATA[counter.acc] in the tag description of an output.
However, I assume I don't have the syntax correct.
Also, do I need to configure the output as an alias, base ore something else?
Thanks a lot for your help.

Tom
 
The physical output you are trying to use: create a new BOOL tag for the output, then alias it to the output address. Do a comparison statement (LES, GRT, EQU, etc.) comapring the tag for the counter accumulator to the desired value, then use your aliased output as the output for that rung.
 
In a SLC or PLC/5 I would use the DCD instruction – however the CLX does not have a DCD instruction – but its still pretty easy in the CLX.



There are some very subtle problems with what you are doing.

First off, the syntax is: Tag.[index] ( thats Tag dot bracket index bracket )

Second, you tried to write to an input word. You should be accessing Local:2:O.DATA.[counter.acc]

Third, you probably need to clear the previously set bit. So when the counter increments from 3 to 4, you want to clear bit 3 and set bit 4. If you don’t take a specific action to clear the previously set bit, it will remain on. This is an excellent place to apply output buffering.

Assuming the following tags (you can call them whatever you want)

Mybuffer DINT
Myoutputs Alias Local2:O.Data <-alias to the word level, not the bit level
Counter1 COUNTER

Program the following code
CLR mybuffer
OTE Mybuffer.[Counter1.ACC]
MOV Mybuffer Myoutputs



I suggest you also take a look at using a sequencer SQO instead of a counter for this. The sequencer will clear the previous step’s bits and set the next step’s bits in a single instruction. You can set single or multiple bits with the SQO.


HowtoDCDonCLX.JPG


(BTW, if you're new to CLX this rung probably looks funny, but its perfectly acceptable the CLX.)
 
Last edited:

Similar Topics

Hi! So my problem is a little funky, I had Studio 5000 v 24 and 30 installed, but forgot to install RSLogix (which I cannot go without). Is there...
Replies
2
Views
89
So I had an odd request from a customer for the above. I have written the logic and tested it all in one PLC with only using 7 outputs and 7...
Replies
15
Views
423
Hello everyone, I have an RSLogix5000 project which is running live in the factory but I need to make some changes to the logic. I want to test...
Replies
0
Views
1,117
Good Morning Everyone, I'm looking to use the GSV instruction to get I/O fault codes for my project so I know if there's a comms issue in my E/IP...
Replies
5
Views
857
The machine is running production. When trying to go online with the laptop the whole machine looses communication and faults out. Drives, HMI...
Replies
13
Views
1,926
Back
Top Bottom