Resetting a user defined data shift reg

Bobobodopalus

Member
Join Date
Feb 2020
Location
Surrey
Posts
89
Hi all,
is there an easy way to reset a user defined shift register to 0?
i have a data type containing 8 bools for an array of 10 and would like to set all bools to 0 for each section of the array.


i hope theres a nice and easy instruction for this
 
No just 8 bools in the data type, FLL just moves it once per pulse right?
Ideally i want to reset all 8 bits of Array[10] in one instruction
 
for the FLL instruction, you might need an unused instance of the data type that has all of us bools unlatched to 0s, and nothing ever writes to that unused udt:

FLL udt_unused_instance udt_array_tag[0]10

you could even put the unused instance at the end of the existing udt array, as element 10, and then:

FLL udt_array_tag[10] udt_array_tag[0] 10
 
not exactly.. but what i have doesnt seem to cause an issue..
what i actually have is
reversed shift reg

Go_pls---mode_enable---COP can_colour_shift_reg[0] temp_can_colour_shift_reg[0] 10---COP temp_can_colour_shift_reg[0] can_colour_shift_reg[1] 10


Clear shift reg

NOT mode_enable--COP can_colour_shift_reg[0] can_colour_shift_reg[2] 10

^^ this is repeated for the temp shift reg



in this section i only latch bits in word [2] and beyond so [0] should always be empty.
i did a quick test online on a plc and it did seem to empty it all fine
 

Similar Topics

Hi, I recently installed 2 1783-NATR devices into two of our machines. The machines are pretty much identical, both having 1769- L24ER-QFC1B...
Replies
4
Views
280
How is it going y'all? So We have had a pesky problem with an EH 300 flow meter. We are using EIP to reset the totalizer, and for some reason the...
Replies
3
Views
710
MELSEQ "intelligent modules" configuration, programmatically resetting the CPU Hello. This is for the Mitsubishi experts, and thanks in advance...
Replies
5
Views
1,016
Hello, I am curious if there is a way to reset a safety password on the CPU mentioned in the title. The previous tech that retired(I took his...
Replies
11
Views
3,993
Hi - I was after a bit of feedback on the alarm resetting logic Im using in a Redlion HMI and 1200 PLC When the "alarm consecutive rejects"...
Replies
10
Views
1,501
Back
Top Bottom