Andrew Evenson
Member
Hi all,
Ive got a situation where I'm trying to sequence through the bits in a word, actually, only the first 5 bits,once bit 5 is true, reset to bit zero and repeat. So it would look like this:
Im triggering the BSL on a 1 mS timer. Im having a hell of a time understanding how it works, and how to make it do what I want. Here's an example of what I've done so far:
Now, If I understand the instruction manual corecctly, Does the "Bit Address" insert a 1 into postion 0 of B3:10?? I was expecting that when I set B3:11/0 it would do just that, but it didnt. I'm very confused, If anyone could shed some light on how to use this instruction, or any other way of accomplishing this, I would greatly appricaite it. I guess I could use a sequencer, but that seems like too much work to just shift bits...Am I making this too complicated???
Thanks,
Andrew Evenson
Ive got a situation where I'm trying to sequence through the bits in a word, actually, only the first 5 bits,once bit 5 is true, reset to bit zero and repeat. So it would look like this:
________________________________________
Word B3:10 |Bit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | etc-> |
------------------------------------------
Shift 1: 1 0 0 0 0 0 0
Shift 2: 0 1 0 0 0 0 0
Shift 3: 0 0 1 0 0 0 0
Shift 4: 0 0 0 1 0 0 0
Shift 5: 0 0 0 0 1 0 0
Shift 6: 0 0 0 0 0 1 0
Shift 7: 1 0 0 0 0 0 0
Shift 8: 0 1 0 0 0 0 0
Shift 9: 0 0 1 0 0 0 0
Shift 10: 0 0 0 1 0 0 0
Im triggering the BSL on a 1 mS timer. Im having a hell of a time understanding how it works, and how to make it do what I want. Here's an example of what I've done so far:
T4:0/DN ----BSL----------------------
-----| |-----------------------| Bit Shift Left |-(EN)
| |
|File : #B3:10 |-(DN)
|Control : R6:0 |
|Bit Address: B3:11/0 |
|Length: 5 |
-----------------------------
Now, If I understand the instruction manual corecctly, Does the "Bit Address" insert a 1 into postion 0 of B3:10?? I was expecting that when I set B3:11/0 it would do just that, but it didnt. I'm very confused, If anyone could shed some light on how to use this instruction, or any other way of accomplishing this, I would greatly appricaite it. I guess I could use a sequencer, but that seems like too much work to just shift bits...Am I making this too complicated???
Thanks,
Andrew Evenson