01-12-2023 09:15 AM - edited 01-12-2023 10:14 AM
Hello all,
we are trying to make VI (laboratory data acquisition in physics experiment) which can acquire data from both channels on Rigol DS1102E using VISA. As start point I use sample for VISA interface to a scope and that works well. I added TDMS functionality which also works well. However, I am having trouble with acquiring signals from both channels. I am attaching VI file which works well. I just can't figure out how to add that functionality, how to acquire both channels and put them into graph and to TDMS file simultaneously ? Usually I just change channel number setting in SCPI command window below the graph to select single channel but I need both channel to be viewed and stored. I tried some samples which can do that with NI DAQ MX but I could not access the scope that way and I am back to VISA now.
Anyone have an idea what to do ?
.
Thank you all,
Tomislav
01-12-2023 12:02 PM
I can see that you are using ":WAV:DATA? CHAN1" to read from Channel 1. I believe that you can call ":WAV:DATA? CHAN2" as well, and then use Merge Signals function before wire to Write to Measurement File Express VI.
01-12-2023 01:00 PM
Thank You, I apreciate the advice. I will try it in the morning when I return to the lab.
Best regards,
Tomislav
01-12-2023 03:48 PM - edited 01-12-2023 03:49 PM
@ZYOng wrote:
I can see that you are using ":WAV:DATA? CHAN1" to read from Channel 1. I believe that you can call ":WAV:DATA? CHAN2" as well, and then use Merge Signals function before wire to Write to Measurement File Express VI.
While in theory this is what you need to do, but I am willing to bet ":WAV:DATA? CHAN1" is going to return an array of floats like any other oscilloscope, not a waveform data type. So merge signals may not be appropriate here.
In fact using Express VIs and the Dynamic Data Type functions like this should be avoided.
01-16-2023 04:20 AM
Thank you for your help, I tried use "merge signal" object, however only compatible data output on VISA objects is "read buffer" which implicates that I need to use more of these object in the same time and that did not work before, even if program does not contain errors, it does not run very good if two sets of VISA objects are used simultaneously (e.g. both channels acquired in the same time with "duplicated" VISA objects using same VISA resource). Maybe there is a way to do that but in this moment I do not see it.
01-16-2023 04:24 AM
Thanks for your help,
well, it did not work. I replied to ZYOng in more detail. If there is a problem with using this kind of method, is there any other way to to acquire signals simultaneously ?
Tomislav