enable outputs as if they were an array

realolman

Member
Join Date
Mar 2009
Location
here
Posts
584
SLC 500

is there a way to turn on outputs as if they were an array? Or something similar?

Right now I have a 16 output card and am comparing the count of a counter using EQU instructions on 16 rungs, and turning on each output according to the results of the EQU.

It works, but I feel like a hack (which I am, but I don't like feeling that way)

is there a more elegant way of doing this? Turn on each output one at a time for about 2 seconds at a time?... what I'm doing is checking to see if the card is good

thank you
 
You could use an integer, with an initial value of 1, that doubles every two seconds. Continually MOV that value of that integer into the output word. It would work for the first 15 outputs, but the last one would have to have a different solution.
 
first rung
XIC S:42/1 MOV -1 O:1.0

second rung
XIO S:42/1 MOV 0 O:1.0

this assumes that your SLC's clock is running – and that your output module is in slot #1 ...

they'll ALL go on and off at the same time – but if you're just trying to check whether the outputs are good or not, that should be enough ... two seconds on – then two seconds off ...

we usually put this right at the end of Ladder #2 when we test modules in the class ...
 
Another good tool for this is a Sequencer Output (SQO). You can load the Sequencer File with a binary series of 2^n numbers (1, 2, 4, 8, 16, 32, and so on up to 2^15 or 32768), then use a 2-second timer to trigger the SQO every 2 seconds, to turn on each Output in sequence.

I can post an example of the above, if you need it.
 
There is an instruction in all SLC and Micrologix processors that does this for you....

DCD

Takes a 4-bit "value", and decodes it to one of sixteen output bits.

The 4-bit value (0 to 15) is the lower 4-bits of the Source word.

Unlike the indirect addressing that chelton suggested, this won't bomb-out if you have other bits set in the source word.
 
Last edited:

Similar Topics

Hello I have In touch 10.1 I tried to enter the WindowMaker to make some adjustments I am using a dongol for the license . I can access the...
Replies
1
Views
88
I'm using one TON (called SystemTimer) throughout a program that I change the .PRE given different conditions. I'm porting an IDEC ladder over to...
Replies
8
Views
318
Hello Friends I have a installation with v16, v17, v18, v19, v20. When I tried to open a v20 file, the enable source protection was not enabled...
Replies
1
Views
241
Hi there, Maybe I am overthinking this issue, but here is what I have going on. I have a program running for a water valve on a DI system. We...
Replies
4
Views
451
I have a FSC instruction that won't enable. I check tags and data type and can't find the problem. I'm trying to pull index numbers for data...
Replies
4
Views
732
Back
Top Bottom