LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sequential using PCI 6251

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.

0 Kudos
Message 1 of 4
(2,569 Views)

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.

0 Kudos
Message 2 of 4
(2,554 Views)

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.

 

0 Kudos
Message 3 of 4
(2,550 Views)

Something like this:

bincount.png

 

Label should be "16 bit value"

0 Kudos
Message 4 of 4
(2,544 Views)