Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to send trigger signal from USB to BNC

Hi everyone,
I need to trigger an oscilloscope using Labview. I have only USB ports on my computer and as far as I know, my HP Infinium 54810A oscilloscope receive trigger signal only from BNC input. Could anyone please suggest a solution? Also, is it true that my oscilloscope cannot be triggered using GPIB?

Thank you very much.

Julianti
0 Kudos
Message 1 of 10
(8,009 Views)
You can always trigger a scope via gpib, if you have it connected by gpib ofcourse.
There should be a vi for that in the driver or you can configure the scope

looking in the driver I found Agilent 548XX Series\Public\Action-Status\Actn Trigger.vi


greetings from the Netherlands
0 Kudos
Message 2 of 10
(8,002 Views)

Hi Julianti,

Albert is right, if you have a GPIB board and cable, definitely trigger through the GPIB bus.  If you want to use the BNC connector on your scope, you will have to get a usb DAQ board that you can route a trigger to a BNC cable with.  NI does sell USB daq boards with BNC connectors.  Alternatively you can modify one end of a BNC cable to connect to screw connectors of a typical USB DAQ board.  That being said, I highly recommend using the GPIB trigger, its the best solution.  I hope this helps!

Cheers,

Ted

Ted H
Applications Engineering
National Instruments
0 Kudos
Message 3 of 10
(7,989 Views)
Thanks Ted and Albert. I do have a GPIB!! I will try now and will let you all know the outcome later.
Thanks again!

Julianti
0 Kudos
Message 4 of 10
(7,975 Views)
Hi,

I tought I found a way to get the data without the trigger command, but it fail. So now I come back again to this original point.
I found the trigger sample as suggested by Albert, but I don't know how to use it. I tried to modify the driver for the HP 54810A but it give error -1073807339 every time i try to run it. I attach the vi here. Please give me a direction. Thank you!! 
0 Kudos
Message 5 of 10
(7,877 Views)
I tried with a simple vi that do nothing but to send *TRG every 50 milisecond, as attached. I tested it with my osciloscope. The VI ran just fine but it didn't trigger the oscilloscpoe. I found that my HP 54810A has 4 options for trigger input, i.e. Chanel 1, Channel 2, External and Line. Obviously it should not be Channel 1 nor Channel 2. However, I tried all options but it is just not right.

I have no idea at all. Please help me.
0 Kudos
Message 6 of 10
(7,844 Views)
Hi Julianti,
 
I'd like to clarify the trigger you would like to use. What type of trigger do you want to use, or are you trying to simply start an acquisition by sending a "trigger" to your device?
 
If you simply want to trigger an acquisition from your computer, all you need to do is run the read waveform vi in the instrument driver library.  If you are looking to trigger your instrument using a signal, you will need to first configure the trigger with the configure trigger VIs.  For more information on how your device responds to specific triggers, and how to program these triggers, I would recommend reading your device's programming manual.
 
Please post back with any additional questions, thanks!
 
Ted
Ted H
Applications Engineering
National Instruments
0 Kudos
Message 7 of 10
(7,809 Views)
Hi Ted,

I think it will be hard for you all to understand my problem. So I will explain the big picture here.

I am trying to acquire a waveform from an ascilloscope (HP Infinium 54810A). The oscilloscope is triggered by a laser at every 50 mili seconds. There is no problem for this as I can see nice waveform on the screen of the oscilloscope. I want to save the waveform in my computer, so I use the "SUB VI Save Data.vi" as attached.  I have a few questions:

1) Is it necessary to include the "Wait (ms)" 50 mili seconds in the VI?
2) If I want the labview to send triger signal to the oscilloscope thru GPIB and then the oscilloscope send another trigger signal to the laser, how to do the first part, i.e. labview send trigger to oscilloscope? If I set the configuration of trigger corectly using the configure trigger VIs, when should I send the trigger signal in my "SUB VI Save Data.vi"?
3) How to get the last value of "Iteration terminal" for a "For loop"? I use "Shift register", is it appropriate?


Thank you so much for your halp....Smiley Happy

Julianti
0 Kudos
Message 8 of 10
(7,745 Views)
these are two more sub vi that I left out in the previous post.

Thanks!!
0 Kudos
Message 9 of 10
(7,744 Views)

Hi Julianti,

About the 50 millisecond wait in the while loop, I don't see how this is absolutely neccessary.  The only reason I can see for the wait is to ensure the execution of the first iteration of the while loop is at least 50 msec. Understanding the context of this sub vi would help in understanding why this loop must take 50 msec or more to execute.

About sending a trigger from your scope to your laser.  Are you sure your oscilloscope can source  a trigger to an external device?  I don't see this functionality exposed in the instrument driver.  I would suggest consulting your instrument's manual to verify this functionality. If you scope can source a trigger, check the scope's programming manual for how to access this functionality programmatically. To send a trigger to your VI, first configure your trigger using the configure trigger VIs, then call the Actn Trigger.vi.  Refer to the examples included with the driver to see the proper way to set up your triggers.

Lastly, to get the last iteration of the for loop, you could use a shift register, but a tunnel with indexing disabled would work as well. If I may make a suggestion, I would highly recommend using the examples provided with the drivers.  These drivers will show you the proper syntax for using the driver VIs.  I hope this information helps, let me know if you have any further questions, thanks!

Ted

 

Ted H
Applications Engineering
National Instruments
0 Kudos
Message 10 of 10
(7,679 Views)