LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ni daq-mx : generate multiple samples

Solved!
Go to solution

Hi !

 

 

I need to send a multiple binary to a multiplexer when i recieve a TTL signal, then, i need to read the signal for each sensor.

But my vi just send 1 them one after another :/, i've tried many things but i'm stuck.

edit : for info i'm using a ni pci6251 and labview 8.5

 

Here is a simplified version of my VI and and little draw i made for you.

 

Download All
0 Kudos
Message 1 of 8
(3,642 Views)

So do you have 8 digital lines wired to your mux? Do you then want to send a series of digital outputs? If yes to both, set the DAQmx Write to 1Chan 1Samp, put it inside a for loop, and wire your U8 array through the loop.

0 Kudos
Message 2 of 8
(3,636 Views)

i'm worry that the for loop don't run fast  enough to generate the samples but if there's no other solution...

0 Kudos
Message 3 of 8
(3,621 Views)

for loops used properly dont impact performance as much as youd think and are needed in many applications, in one of my current jobs i am using a number of them (avoiding nesting them if i can) but using the paralelism and conditional terminals to keep performance up. on the block diagram right clock on the for loop and there are some optios conditional terminal (allowing you to end the for loop early) and configure paralel (runs a number of thefor loops in paralell, there are some constraints on doing this).

 

sorry for the spelling i have dyslexic fingers this morning

 

hope it helps 

Please remember to accept any solutions and give kudos, Thanks


LV 8.6.1, LV2010,LV2011SP1, FPGA, Win7
0 Kudos
Message 4 of 8
(3,618 Views)

I put a for loop

 

i put the stop task outside the for loop, of course, the program just write me 1 sample after another after each TTL signal and labview is stuck on the writing VI at the 2nd for loop

grmbl...

0 Kudos
Message 5 of 8
(3,611 Views)

Hi i somehow manage to make it wth generating a pulse train on the TTL signal and writing the samples on the pulse train.

I'll give u the VI once i'm sure it works

0 Kudos
Message 6 of 8
(3,604 Views)

Hi Daparta,

 

I am not sure to have fully understodd what you wanted to do.

Could you try the .vi I attached.

 

regards

Romain DUVAL || RF & Semiconductor Staff System Engineer || CLA || CTA
National Instruments France

0 Kudos
Message 7 of 8
(3,595 Views)
Solution
Accepted by topic author daparta

u didn't fully understand what i want to do but u may have some other solution, anyway i managed to do succeed,

check the VI i atached, it works.

 

at each TTL i generate a pulse train, and the binary words are synchronised on the pulse train.

Message 8 of 8
(3,585 Views)