LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do i create two Examples in Parallel operation

Cont Acq&Graph Voltage-Ext Clk.vi
Measure Angular Position.vi
 
How do i make these two example program in a Parallel execution mode?
 
Joe
Using Ver. 8.0
0 Kudos
Message 1 of 5
(2,840 Views)
Have you tried running the two separate VIs at the same time? As long as that works, you can put both in a main VI and just have no data dependency between the two. You can simply drag the diagram from one to the other and have two separate while loops or combine the two DAQmx reads into a single while loop like the attachment.
Message 2 of 5
(2,817 Views)
I done this in the following way.
Encoder output is connected to PFI0 and CTR0_SOURCE.
AI is getting triggered by PFI0 and  Counter Input is configured for Counter Edge.
Once this over this datas are logging into a file.
Problem is... as per the flow once i finished the loop i.e pulse count *0.144( which is the angle for each pulse, because i am using 2500PPR Encoder) reaches 70, pulse count will be 486 and the same time if you check the file , we wont have 486 datas in it, we will missing some 50-100 data on that.
this encoder movement is manual and speed varies always.
this missing data in file will happen only if the speed of encoder movement increased.
can we make this independent  of speed ???
pls refer the attached file for program flow.
Joe
Using Ver. 8.0
0 Kudos
Message 3 of 5
(2,791 Views)
Hi, Joly.

The first thing I noticed about your code is that you have the open/close file VIs inside your while loop, and this seems like a possible cause of your data loss. Opening and closing files are pretty lengthy operations (relative to most other VIs), and it's best to repeat them as little as possible. You may want to try moving the Open/Create/Replace File VI before the loop and the Close File after the loop. Let me know how that works for you.
Sarah K.
Search PME
National Instruments
Message 4 of 5
(2,750 Views)

thanks bcos of file open and close inside the loop only i lost data now as you suggest i removed open/close and put it outside the while loop so that its working good.

thanks...to all..

Joe
Using Ver. 8.0
0 Kudos
Message 5 of 5
(2,592 Views)