Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

200429

Hi, I am receiving error code 200429 ("Error -200429 occurred at DAQmx Write; Value passed to the Task/Channels In control is an empty string") when attempting to run two similar VI's (both of which use two analog out tasks) seqentially as subVI's.  Each one works fine when run separately, and I only get the error message when they are both run as subVI's in a single master VI.  I can tell this has something to do with correctly creating/clearing/passing device channels and have read the 3 or 4 other threads on this error code, but I still can't seem to figure out how to fix my problem. 

I am using Labview with a basic multifuncton DAQ and a separate TTL counter card (Ortec MCS card)  to raster a piezoelectric scanner while counting photons from a sample.  I'm using the tics from the TTL counter card's onboard clock to synchronize everything.

Attached are 3 files which are minimal representations of my VI's which are still sufficient to create the error code.  The actual VI's I am using include a timer/counter source (the Ortec MCS card) access via ActiveX controls, but the timing, counting and ActiveX elements are not associated with the problem so I have removed those parts for clarity.   In place of the MCS timer I have substituted the 20MHz timebase on the NI DAQ board.


full_scan_hardwaretimed.vi
  is the initial scanner VI.  It takes use input for the range, # pixels and dwell time and sends two AO voltages to an external scanner for rastering the sample (typewriter-style).  The rastering is accomplished using two timed loops which are synchronized and timed using the output tics from the Ortec MCS card.

ROI_scan_hardwaretimed.vi
is very similar to the initial scanner VI.  It takes 3 additional inputs (x-offset, y-offset, and a scaling factor <1) and performs another raster scan of the region of interest ('ROI').  This is where I get the error. 

scope_controller.vi is the master VI which runs both Sub VI's sequentially.  They have to be sequential because in between the full scan and the ROI scan a matlab script processes the full image determines the offset for the ROI VI.  In my actuall full program the Matlab script actually returns an array of points, and the  ROI_scan_hardwaretimed.vi will need to run multiple times in a while-loop. 

Oddly, I have previously had no troubles with a very similar VI which collects a full-scale image, processes it in a Matlab script, and then passes the returned array to a second VI for point-dwelling (as opposed to smaller ROI image collection).  This previous program had no trouble using the 2 AO's on the DAQ in both sub-VI's.  I only began to encounter the error when I asked it to scan a smaller region at each point, instead of just sitting stationary at each point. 
0 Kudos
Message 1 of 2
(3,819 Views)
I was able to fix the problem by replacing the task-wire tunnels in each timed loop with shift registers. 
0 Kudos
Message 2 of 2
(3,809 Views)