12-16-2012 12:00 PM - edited 12-16-2012 12:01 PM
Hi there
I am fairly new to NI and I'm kinda lost
I am currently using a PCI 6251 and LABView 6
I need to apply a sequential logic to the system to activate my switches
I want to use the first 16 DOs and the system goes as such:
The first four bits would count up from 0000 to 1100 and each time an increment is made, the other 12 Dos would count up consecutively and it repeats itself.
Example : lets starts with 0000 (first four bits)
000000000001
000000000010
000000000100
untill
100000000000
then the first four bits would increase by 1 again to 0001 and the other 12 bits would go start the count again, the same as the one before.
Untill the first four bits is at 1100 and all the system is stopped.
Its so sequential but I dont know how to tell arrange the programs as such that it would understand all the sequences I wanted.
I hope that you guys could help me
Any references would also be appreciated.
Thank you in advance.
12-16-2012 03:52 PM
Do you want to increment the four bits from 1011 to 1100 and then stop without going through another set of shifts in the other 12 bits? In other words you want to shift a binary "1" to the left by twelve bits * 12 iterations, right? Otherwise, if the 12 bits are shifted for each value of the four bits, you're actually going through the whole thing 13 times.
12-16-2012 06:58 PM
If I were to put it up in a way, it will be like this:
D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15
first
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1,
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0,
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0,
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0,
until
0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0.
Increase the first four bits by 1
0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1,
0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0,
0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0,
0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0,
until
0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0.
The system goes along until the first four bits is 1100 and the loops go by:
1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1,
1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0,
1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0,
1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0,
untill
1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1.
Then the system halts.
The signals is just used to control the switchings. Levels used are just +5V and 0V.
Thank you.
12-16-2012 07:58 PM - edited 12-16-2012 08:11 PM
Something like this:
Label should be "16 bit value"