Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate and acquire data with marker (HSDIO)

HI. I use PXIe-6556. What i do:

1). Export Onboard clock to DDC CLK OUT. I connected physically PFI4 to PFI3.

2). Then I use script to generate data. In script I use marker (PFI2).

3). And I want acquire data when marker appears. But instead this i have mistake:

niHSDIO Fetch Multi Record (WDT).vi<ERR>Driver Status: (Hex 0xBFFA4020) Some or all of the samples requested have not yet been acquired. To wait for the samples to become available, use a longer read timeout or read later in your program. If your session uses a trigger, make sure that your trigger is configured correctly.

Status Code: -200284

 

Please help what i do wrong?

 

 

0 Kudos
Message 1 of 6
(4,065 Views)

Hi,

 

As the description of the error says this occurs when the cofigured timeout happens before the number of samples you have requested are available on the onboard memory of the device. You can increase the timeout time or reduce the size of the records. Also I found the following Knowledge Base article that talks about the error 1074118624:

How Can I Fetch the Onboard Data from my NI-HSDIO Device After a Timeout Occurs?

http://digital.ni.com/public.nsf/allkb/C7B3DE12E458B9B186257669007B0176

 

Luis G.

NI

0 Kudos
Message 2 of 6
(4,041 Views)

Increasing timeout doesn't help.

 

I increase number of repeating data in script to 100. I can acquire only 21 times. But 22 I can't. I don't understand why.

0 Kudos
Message 3 of 6
(4,030 Views)

Hello,

 

What purpose does exporting the onboard clock to DDC CLK OUT have on your application? Since you are acquiring with the onboard clock, it breaks the source synchronous paradigm that the DDC CLK OUT signal is typicall used for. This white paper talks about various synchronization methods HSDIO Generation and Acquisition Synchronization

 

Next, you use an advance trigger without a start trigger on your acqusition session. The advance trigger is meant for multi-record acquisition. Do you wish to acquire multiple records, or just all the data in a single record? You also start acquiring immediately, since no start trigger is configured. This may cause issues with synchronization as software will start your acquisition session before your generation session, and you will likely acquire bad data at the beginning of the program.

 

If you route the clock to PFI 3, you're effectively triggering off the clock, which seems strange to me. Also, since the clock is periodic, likely your "wait until scriptTrigger0" line of your script will execute instantaneously, because once a script trigger is received, it is latched/asserted until it is read or the clear scriptTrigger0 script function is called.

 

Even if you increase your repeating to 100, you are setting your acquisition size to equal to wfm + wfm1, and then acquiring three records of that amount. Maybe you've changed the record size as well when you changed your repeat, but thought I'd point that out.

 

If you want to acquire data when the marker0 appears, you should move the marker to assert just before you generate data. Otherwise, you are waiting cycles before "generate wfm" appears, and you will likely acquire less data than you intend. 

 

To debug, you may want to check how many records you are acquiring vs what you have configured. You should also consider reducing the acquisition size/samples per record while you are debugging. You also reduced the timeout to 5s in the code you listed, but you might want to consider leaving it as default 10s while you figure out how the code is working.

 

My recommendation is to reduce the script to one waveform, without scriptTrigger0 (since it doesn't look to be doing much), and see if you can get marker0 to trigger your advance trigger correctly so that you can acquire multiple records. Once you have that down, you can move towards increasing your records, your acquisition size, and adding more waveforms into your generation script starting from a known working point. It seems like trying to make everything work all at once is making things too complicated, and it is hard to tell which part is failling.

 

Hope this helps, good luck.

Kyle A.
National Instruments
Senior Applications Engineer
0 Kudos
Message 4 of 6
(4,022 Views)

What purpose does exporting the onboard clock to DDC CLK OUT have on your application?

- PFI4 I use as an trigger. When I connect it to PFI3, i simulate an external trigger (i use it as scriptTrigger0). 

 

Do you wish to acquire multiple records, or just all the data in a single record? 

- I wish acquire multiple records (only when marker appears).

 

My recommendation is to reduce the script to one waveform, without scriptTrigger0 (since it doesn't look to be doing much), and see if you can get marker0 to trigger your advance trigger correctly so that you can acquire multiple records.

- When I get trigger on PFI3, i must generate data. It i must repeat 10000 tymes, for example.

0 Kudos
Message 5 of 6
(4,020 Views)

I reduced script to one waveform but it also doesn't work.

0 Kudos
Message 6 of 6
(4,003 Views)