09-29-2022 10:27 AM
Hello,
I have a setup with a BNC-2090/PCI-6143 currently hooked up to a Rigol DG972 signal generator from the PFI0/TRIG 1 port on the 2090. I have been trying to use labview to send a signal to the signal generator to trigger it to start generating a signal so that I can synchronize the start of the signal with the start of measurements for several other devices I have connected to the BNC-2090's analog input ports. However, I am very new to labview and do not know how to accomplish this task within the program or even which port I need to connect the signal generator to. Is doing this even possible, and if so, what is the way I would do this?
-Stongduke
09-29-2022 03:58 PM - edited 09-29-2022 03:58 PM
Well I could not find a prebuilt LabVIEW "driver" for that device, so you are going to have to make your own.
FYI: Most LabVIEW drivers are simply a set of VIs the manufacture made that use SCPI commands and VISA. That's what you are going to have to do using the SCPI commands in the DG900 Programming Guide
I just skimmed the programming guide and there is a (rather poor) LabVIEW programming example in Chapter 4.
Study the programming guide and try a few things. If you still are having problems come back and show us what you tried and what didn't work.
09-30-2022 10:14 AM
Hi RTSLVU,
Do you think the example to create drivers in this guide you shared can be used for any NI device?
09-30-2022 12:20 PM - edited 09-30-2022 12:20 PM
@GRCK5000 wrote:
Hi RTSLVU,
Do you think the example to create drivers in this guide you shared can be used for any NI device?
By NI device do you mean LabVIEW version? The example is for LabVIEW 2009, but it's pretty basic (you are just sending text [SCPI commands] using VISA) so the example should work for any LabVIEW version.
10-03-2022 09:50 AM
Not labview version.I meant NI device like cdaq 97xx, etc...
10-03-2022 09:55 AM
@GRCK5000 wrote:
Not labview version.I meant NI device like cdaq 97xx, etc...
All NI Instruments use proprietary driver APIs and do not use VISA or SCPI commands such as the third-part bench instruments. You need to familiarize yourself with the appropriate driver for that instrument in order to use it, for example, for the cDAQ stuff you need to use the DAQmx driver APIs to control.
10-03-2022 10:48 AM
Thanks Santos! This answered my question. I want to know if from the link you shared, section 4-9 to 4-15. Can I follow this example to build a driver for a third party instrument?
10-03-2022 11:24 AM
@GRCK5000 wrote:
Thanks Santos! This answered my question. I want to know if from the link you shared, section 4-9 to 4-15. Can I follow this example to build a driver for a third party instrument?
I cannot generalize it as just any third-party instrument, most leading instrument manufacturers adhere to the SCPI syntax which can be implemented using VISA, and some manufactures provide a proprietary dll to communicate with the instrument.
In sections 4-9 to 4-15, the implementation looks like a simple UI event handler, I don't see a value compared to the Interactive VISA debug screen.
In addition, I would always recommend watching this tutorial - https://labviewwiki.org/wiki/VIWeek_2020/Proper_way_to_communicate_over_serial
10-03-2022 12:15 PM
SCPI was an attempt to standardize instrument communications.
So in theory SCPI commands for one manufacturers sig-gen should work on another manufacturers sig-gen.
But it is a voluntary standard so don't count on it always being so.
Specially when you get into advanced commands and options that one device may have that the other doesn't...