LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Analog Simultaneous Read Write Errors,

Please help!

 

I'm attempting to send a command signal (Sine wave or trapezoid wave)  to a device through a DAQ 6215, and then read the devices feedback continuously.  Both command and feedback signals will plot in the UI.   The comand signal will be constantly changing.  I've copied the DAQ portion of the code from a LabVIEW example called Multi-Function AI-AO.vi, but keep getting errors from the small changes I made.

 

I know the code is a bit stringy, but any fixes will be greatly appreciated!!

 

Thanks,

Christopher

0 Kudos
Message 1 of 5
(2,315 Views)

OK Christopher, Thats a bit better than yesterday but,

 

  • do not create and destroy DAQmx Tasks onside a loop.  Create them once (Preferably during development and save them in your Project or MAX if you failed to learn the benefits of projects) but at the least if you feel you need to create the task at run time create it before the loop destroy it after the loop.  you can even change the tasks min/max with a DAQmx property node (or read the timing source or change the sample rate whatever......)
  • Why would you wire "Autostart" true and then use "Start Task.vi"?  Did you read the DAQmx help file?  Not the LabVIEW Help there is a help file for DAQmx!
  • Local variable use is totally wrong.  Read the unwired terminals.
  • How many times do you need to set the minimum entry for frequency to 0?  Every loop iteration?  Or would just 1 time, during development, from the control property dialog be enough?
  • Why wire an array and chose 1ch1samp wfm? wouldn't selecting the Analog 1D DBL 1 chan N sample be more appropriate?

And DO look at the shipping examples for LabVIEW


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 5
(2,309 Views)

Thanks for the reply again Jeff. 

 

I've switched to max tasks (instead of virtual channels).  Why is it that I can read and write symultanioulsy with Max tasks but not with vitrual channels?

 

I have a few more questions:

 

There are two arrays in my vi, on is 1D and the other is multipleD.  Is there anywhy I can put them on the same plot?  Right now I've made one plot transparent and put it direclty on top of the other.  This looks ok, but the data won't export into the same excel file.

 

What did you mean when you said: "Local variable use is totally wrong.  Read the unwired terminals."  Could you show an example?

 

In my first post you mentioned that something was wrong with the 'Settings' buttons, how can I find the error?

 

Thanks for your help!

0 Kudos
Message 3 of 5
(2,277 Views)

Chris,

 

The LabVIEW Help File steps through how to put more than more than one plot on a graph.

Also the steps that

Regards,

M. Whitaker
ni.com/support
0 Kudos
Message 4 of 5
(2,246 Views)

Thanks guys for all the help!  My project is up and running now.

-Christopher

0 Kudos
Message 5 of 5
(2,237 Views)