High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically triggering a High-Speed Digitizer (PCI)

I am trying to set my LabVIEW program for data acquisition using an AlazarTech PCI High-Speed Digitizer (2 simultaneously sampled channels, maximum sampling rate - 125 MS/s). I am using the LabVIEW VI shipped along with the digitizer card and have incorporated a few changes as required by my application. I read a range of frequencies from a text file, and each frequency value is sent to a function generator. The next value is sent after a certain delay, the time period between each increment being used for collecting data at the set frequency. The problem I am facing is the following: the digitizer card does not trigger until the last frequency value is read from the text file, and it considers only the last frequency value. I would rather like to set my program in the following fashion: read each value from the frequency table (the contents of which are obtained by reading from a text file) and programmatically trigger the digitizer card to acquire data. After a certain delay, the next frequency value from the frequency table is read and the digitizer card is triggered again. I have enclosed the LabVIEW VI below. Can anyone suggest how this can be achieved. The LabVIEW VI shipped with the digitizer card from this company is basically a queued state machine, which to me is a little overwhelming to understand as I am quite new to LabVIEW.
0 Kudos
Message 1 of 6
(7,546 Views)
Hello,
 
Programmatically triggering your AlazarTech card is going to require calling some triggering function in the AlazarTech driver (if they have such functionality).  There is nothing inherent to any programming environment (including LabVIEW) which is going to already know how to instruct your AlazarTech card - that will be the duty of the driver, usually a dll, which the AlazarTech hopefully created for you that provides programmatic triggering functionality in the manner you describe.  You should contact AlazarTech to see if they provide such functionality, and if so, details about how to call the appropriate function in the appropriate dll they provide.
 
Best regards, and sorry I can't be more specific... perhaps someone out there has used that card before, and already contacted AlazarTech to get this information.
 
JLS
Best,
JLS
Sixclear
0 Kudos
Message 2 of 6
(7,530 Views)

Hi JLS,

Thanks for your reply. I do have all the necessary DLLs/LLBs from AlazarTech. As I am quite new to LabVIEW, I am finding it a little difficult to transform my ideas into LabVIEW. I would appreciate if you can give me a general idea as to how this is done. Here's a brief summary of my application: I am using a function generator to input Sine wave signals of various frequencies (read from a text file that are stored in an array, reading one value at a time from the array) and fixed amplitude to a transducer. The transducer's output is sent to a PCI digitizer card and the resulting output is displayed on the front panel after completing all the required analysis. And here's where I am getting into rough weather: I would like to trigger the digitizer card each time a new frequency value is read from the array. As of now, the card is triggered only after all the elements of the array are read.

Do I need to "force a trigger" each time a new frequency value is read. Or is there some other way out to resolve this issue. Would appreciate your reply. Thanks!

0 Kudos
Message 3 of 6
(7,523 Views)
Hello,
 
I tried to open your code to see if the problem you are having is due to the structure of your code, but I couldn't open the VI for some reason - if this discussion doesn't solve the problem can you post it again?
 
Anyway, in general, if you are indexing values from an array in a loop, you should be able to compare or analyze those values to determine if the trigger condition (whatever that is - you said a frequency change) has been met.  At that time, I think you would be calling your dll function to trigger the card.  If you are having problems with the dll calls, you should definitely check out the Call DLL.vi example (click Help -> Find Examples... in LabVIEW, and then search the keyword dll).  The example will allow you to see LabVIEW and C corresponding datatypes, and will open other example VIs which use dll calls with those datatypes.
 
I'm not sure what's going on with the VI, but I hope this helps!
 
Best Regards,
 
JLS
Best,
JLS
Sixclear
0 Kudos
Message 4 of 6
(7,510 Views)
Hi JLS,
Here's the VI and some more information about my application, the actual problem and what I would like to implement.
 
This is an actual application in LabVIEW I am working on currently. I have 2 cases within a case structure. Case 0 takes care of setting the frequency of the function generator, which is code we have been discussuing so far. Case 1 is the code for controlling the PCI digitizer card for data acquisition. Each time the frequency is changed/updated in the function generator (Case 0), I will need to generate an event to trigger the digitizer card in Case 1 to acquire data and write to file. I have everything in place, except for the part where the appropriate event needs to be generated to trigger the digitizer card. I am really not sure how this can be done. For your reference, I have attached the following:
 
1. The actual LabVIEW application - Single probe dual coil DAQ
2. Zipped file of all the AlazarTech VIs
3. To unzip the above files, you will need to download 7-zip software by clicking on the link below. I am not sure if winzip also works, as the files were zipped using 7-zip.
 
 
Will look forward to your reply. Thanks!
Download All
0 Kudos
Message 5 of 6
(7,503 Views)

Hi ResearchG,

I look to your Single probe vi and I think the problem is that you set 2 loop which run one after the other.  You use sequence but the sequence is not in a "Main Loop" then each frame run one after the other.

First loop read ALL frequency from your file, set the generator for each of them then after that go to the next loop where you try to acquire data with the digitizer.

You must combine both loop in one in which you will set ONE frequency, acquire, process data and repeat until using all frequency.  I suggest you to look on the "_ATS_How.vi" frame 1 and 2 and study these simple example and use only the VIs you need in your main loop.  You needs : Initialize, Set device (outside the loop) then in the loop, after setting the generator use the Arm, Wait until busy then read data process...

Hope that can help.

0 Kudos
Message 6 of 6
(7,494 Views)