rsdoran
Lifetime Supporting Member
I am now working with products from Horner...[url]www.heapg.com[/URL] Specifically the OCS and RCS units using CScape software. This vendor has been supplying GE Fanuc with 3rd party devices for years. The CScape software uses terminology and functions similar to GE Fanuc.
The software does NOT have a sequencer function(like AB's SEQ or GE's Drum), does have a SHL (shift left) and SHR (shift right) but they shift one or more bits all at once...and once used will not shift again.
I am trying to develop a sequencer...ie use an array of bits, lets say 16 bits in Register 5 (%r5). What I want is to be able to use the bit level address of this register to turn on outputs or start an action within the plc...ie
I want to shift and add bit to this register at same time thus FILLING the register..ie
00000000
00000001
00000011
00000111
etc
To give a better view of what I am doing I have a plc tester/trainer built to work with in my shop. This unit has 8 inputs, 6 outputs wired to lights and an HMI that has 12 keys that can be used in ladder code.
A question here prompted me to look at ways to do sequencing, the post was about starting 6 fan motors with a 5 second delay using one PB. I have taken that task a step further by attempting to turn off the 6 outputs in sequence with the timer delay.
I have created a working solution that I think may be sloppy and uses to much code/rungs. I used one of the HMI keys to act as a PB to start a timer which turns on each output after 5 seconds. This requires a line for the initial start sequence that has a timer, I dont latch output 1 yet because of the sequence.
This option requires the use of 2 lines of codes per output, one for the SHL and other to latch output..NOTE I am not using SET/RESET...just latching with branch and XIC that is output. SET/RESET might make it easier but I attempt to avoid using them.
Since 6 outputs are involved and the original start ckt we are at 13 to 14 rungs. Because I used features of the scan to latch the ckts...an XIC of the bit used to turn on the output in series with the output XIO I could just use SHR's to turn OFF the outputs when the bits are true. There are details to work out but overall I am at 20 rungs.
Is this acceptable...I dont think it is...or am I worrying to much about details? Are there ways to create a sequencer with a few functions that could eliminate all these rungs? I know this can be done with multiple timers but that also seemed sloppy to me.
This is NOT a project, just me looking for ways to familiarize myself with NEW software that is PART of my new job. I guess I have gotten use to having sequncer functions built into the software and now want to find a way to create one.
BTW...the SHL and SHR move bits according to the input and count(s). That means if I move a bit once that SHR/SHL is done, I have to setup new SHR/SHL to move bit again. This software also does no allow functions to be branched....ie the need for an SHL/SHR for each output.
Appreciate any ideas.
The software does NOT have a sequencer function(like AB's SEQ or GE's Drum), does have a SHL (shift left) and SHR (shift right) but they shift one or more bits all at once...and once used will not shift again.
I am trying to develop a sequencer...ie use an array of bits, lets say 16 bits in Register 5 (%r5). What I want is to be able to use the bit level address of this register to turn on outputs or start an action within the plc...ie
Code:
R5.1 Out1
|---| |-------------------------( )--|
00000000
00000001
00000011
00000111
etc
To give a better view of what I am doing I have a plc tester/trainer built to work with in my shop. This unit has 8 inputs, 6 outputs wired to lights and an HMI that has 12 keys that can be used in ladder code.
A question here prompted me to look at ways to do sequencing, the post was about starting 6 fan motors with a 5 second delay using one PB. I have taken that task a step further by attempting to turn off the 6 outputs in sequence with the timer delay.
I have created a working solution that I think may be sloppy and uses to much code/rungs. I used one of the HMI keys to act as a PB to start a timer which turns on each output after 5 seconds. This requires a line for the initial start sequence that has a timer, I dont latch output 1 yet because of the sequence.
This option requires the use of 2 lines of codes per output, one for the SHL and other to latch output..NOTE I am not using SET/RESET...just latching with branch and XIC that is output. SET/RESET might make it easier but I attempt to avoid using them.
Since 6 outputs are involved and the original start ckt we are at 13 to 14 rungs. Because I used features of the scan to latch the ckts...an XIC of the bit used to turn on the output in series with the output XIO I could just use SHR's to turn OFF the outputs when the bits are true. There are details to work out but overall I am at 20 rungs.
Is this acceptable...I dont think it is...or am I worrying to much about details? Are there ways to create a sequencer with a few functions that could eliminate all these rungs? I know this can be done with multiple timers but that also seemed sloppy to me.
This is NOT a project, just me looking for ways to familiarize myself with NEW software that is PART of my new job. I guess I have gotten use to having sequncer functions built into the software and now want to find a way to create one.
BTW...the SHL and SHR move bits according to the input and count(s). That means if I move a bit once that SHR/SHL is done, I have to setup new SHR/SHL to move bit again. This software also does no allow functions to be branched....ie the need for an SHL/SHR for each output.
Appreciate any ideas.