LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sequence of digital output channels

I have an application where a 11bit wide adress must be written to digital out ports. I did this by creating the channels with the "DAQmx create channel.vi" and then writing the adress with the "DAQmx write.vi". The problem now is the sequence (mapping) of the output channels. I would like it to be as follows (Dev2 stands for a PCI-6534 card):
 
adress(0) = Dev2/port3/line0
adress(1) = Dev2/port3/line1
adress(2) = Dev2/port3/line2
adress(3) = Dev2/port3/line3
adress(4) = Dev2/port3/line4
adress(5) = Dev2/port3/line5
adress(6) = Dev2/port3/line6
adress(7) = Dev2/port3/line7
adress(8) = Dev2/port2/line0
adress(9) = Dev2/port2/line1
adress(10) = Dev2/port2/line2
 
To acomplish that I have defined the "lines" port of the create channel VI with "Dev2/port2/line2:0, Dev2/port3/line7:0". It seems, however, that LabView does not pay any attention on the sequence the channels are defined, the mapping turns out to be always:
 
adress(0) = Dev2/port2/line0
adress(1) = Dev2/port2/line1
adress(2) = Dev2/port2/line2
adress(3) = Dev2/port3/line0
adress(4) = Dev2/port3/line1
adress(5) = Dev2/port3/line2
adress(6) = Dev2/port3/line3
adress(7) = Dev2/port3/line4
adress(8) = Dev2/port3/line5
adress(9) = Dev2/port3/line6
adress(10) = Dev2/port3/line7
 
I also tried to create a virtual channel in MAX, but there in cannot define the sequence again and it seems also impossible to combine channels of different ports in the same virtual channel.
 
Has anybody come across this problem also and can give some tipps. I would appreciate an answer very much.
Regards, Martin R.
 
0 Kudos
Message 1 of 4
(2,672 Views)
Can you create 2 separate tasks, one for each port?  Then you could break your 11 bits into [parts of 3 bits and 8 bits and direct them to each respective task in the order you need.
0 Kudos
Message 2 of 4
(2,655 Views)
That is of course a possibility. I decided, however, to live with the channel sequence and program a adress decoder which fiddles the bits so that my desired sequence is achieved.
0 Kudos
Message 3 of 4
(2,651 Views)
Hi all,

I found this example in a previous thread, is that something that could help you?

Cheers, Bernd


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