PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Error -200577 when TClk with 6542 and 5122

Hi,
 
I have a VI that uses a software trigger to start pattern generation with a 6542, and uses TClk to synchronize the start of this generation, with the start of acquisition with a 5122.  The VI has two threads, one that creates a 6542 gen session with a software start trigger, and waits until I press "start" to issue the software start trigger. The other thread creates a 5122 acquisition session, with no trigger configured, since the TClk help files say that homogenous triggers are inherited from the master, and don't configure a trigger for the slaves.  When I try and run it, I get the following error:
 
"Error reported by the instrument driver:
DAQmx Error -200557 occurred:
Measurements: Specified property cannot be set while the task is running.
Set the property prior to starting the task, or stop the task prior to setting the property.
Property: 5011
Status Code: -200557"
 
Is there some required flow, i.e. order of events, to a VI with several devices/sessions created, that uses TClk? I followed the NI-SCOPE and HSDIO examples that use TClk, by getting a session ref for each, as soon as their instrument handles are created, gathering them in an array, and passing to the three TClk VIs.
 
Veddy confused.
 
Bill M
0 Kudos
Message 1 of 5
(4,388 Views)
Hi Bill -

I think the problem is here: The VI has two threads, one that creates a 6542 gen session with a software start trigger, and waits until I press "start" to issue the software start trigger.

If you're manually starting one of the tasks, NI-TClk can't set properties and start the tasks itself.  You shouldn't be calling any of the drivers' Initiate VIs  Instead, just configure the tasks as you want, then use the <drivername> Get Session Reference VI and build the references into an array.  Pass these references into the TClk VIs, and when you call niTclk Initiate, the TClk software will start all the drivers' sessions at the appropriate time.

Here's an example using an AWG and a digitizer, but the idea is the same.
David Staab, CLA
Staff Systems Engineer
National Instruments
0 Kudos
Message 2 of 5
(4,382 Views)
David,
 
Thanks so much.  I actually had looked at that example, but it never occurred to me (nor do I recall it mentioned in TClk Help), that you don't call the individual sessions' Initiate VIs. Makes sense, it just never occurred to me. I will try it.  I assume I can still manually send a software start trigger on the master session.
 
Thanks again,
 
Bill
0 Kudos
Message 3 of 5
(4,375 Views)
Hi Bill -

The software trigger isn't sent when you Initiate the device.  It's sent when you call the Send Software Edge Trigger VI.  This excerpt from our help files explains some of the details of configuring triggers with TClk.  Most of our TClk information is in the High-Speed Digitizers Help, under "Programming » Reference » NI-TClk Synchronization Help".

You can download an old revision here, or if you have the NI-SCOPE driver installed you can find it in the Start menu.

Message Edited by David S. on 05-22-2007 03:47 PM

David Staab, CLA
Staff Systems Engineer
National Instruments
Message 4 of 5
(4,376 Views)
Hi David,
 
I have read the TClk Help, and another informative tutorial here http://zone.ni.com/devzone/cda/tut/p/id/3675 but I still have a question: 
 
I organized the sessions as you said and I also used a sequence diagram to ensure the following order:
 
(Reminder: Doing 3 things simultaneously: Gen pattern with 6542, acquire pattern with 6542, and digitize with 5122)
 
1. 6542 gen session has waveforms and script written
2. TClk sessions are gathered in an array (6542 session set as master using "NI-TClk Property Node"), homogenous triggering is configured, synchronized, then initiated
3. 6542 multi-fetch and 5122 multi-fetch then allowed to proceed
 
The 5122 triggers fine on the send software start trigger in the 6542 gen session, but I get the following error from HSDIO multi-fetch:
"Specified operation is only supported while the session is running.
Initiate the session before requesting the operation and make sure that the session has not been aborted."
 
This makes sense on one level, because I had to delete the HSDIO Get Session Reference I had for the 6542 acquisition session, because I got a "duplicate session" error, which I assumed meant that one device (6542) had to use the same session for simultaneous generation and acquisition. So I have only session references for the 6542 gen session and 5122 acquisition sessions, in the session array going to TClk. I don't explicitly call HSDIO initiate (or set up a trigger), on the 6542 acquisition session either, thus the error that it's session isn't started when the multi-fetch is called?
 
So what do I do? Manually call HSDIO initiate for the 6542 gen session? I did try again to get it's session ref and include in the session array to TClk VIs, but I get the duplicate session error again.
 
Bill
0 Kudos
Message 5 of 5
(4,365 Views)