LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

daq buffer and data passing with code

Hi all,

 

I need some serious help!  In the attachment, the loop in vw_test_que vwpulse reads from the analog in buffer continuously, and the loop feeds the data to subvi seek position, which look at the received analog input data to determine what to do next.  The program doesn't work, and I can't pin point what's wrong at the moment.  I tried function global, queue, and regular global (current method used in the file), but none of them work properly for me.  I don't exclude the possibility that my data acqusition code could have some problem as well, please take a look. 

 

The analog input data gives the position of a energize motor.  If the seek position subvi doesn't get the data quickly enough, the position would be lost.  Let me know if you can help.  Thanks! 

 

 

 

 

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
Download All
0 Kudos
Message 1 of 4
(2,479 Views)

It would be easier if you could attach your entire project (as a .zip) including all subVIs and type definitions.

 

Can you be more specific than "doesn't work"?  The correct approach to transferring data between two loops in this situation is a queue to avoid losing data.  Try removing your data acquisition and replacing it with a loop that feeds simulated data to the queue to verify that your logic works properly; this will help determine if your problem is your measurement code or your data acquisition.

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

Hi,

 

Try using debugging techniques like highlight execution, breakpoints and probes.

 

Execution Highlighting

 

Placing and Removing Breakpoints

 

Using the Probe Tool

 

If you are trying to pass data using queues, there are examples in the LabVIEW Example Finder that demonstrate how to do that. Look at Queue Basics.vi

 

What is your program trying to do?

 

What is the problem with it?

 

Have you tried using the basic debugging techniques such as breakpoints and probes?

 

The following is missing from your program.

 

vw_gv.vi

vw_Position.vi

vw_PulseCMD.vi

False23.ctl

vw_Measure CMD.ctl

vw_Acutate CMD.ctl

vw_file command.ctl

vw_Actuator type.ctl

vw_testplan.ctl

vw_measure queref.ctl

vw_channel definitions.ctl

vw_pulse acutate.ctl

vw_Time elapsed.vi

vw_Direction.ctl

vw_Detect Check.ctl

vw_File Channel.vi

 

 

Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 3 of 4
(2,442 Views)
Thank you!
------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 4 of 4
(2,425 Views)