LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview Problem Trigger

Ok, you should take a step back and fully describe your setup, your desired measurement and then we can help work on the code.  You mention you want to setup 2 DMMs (hp34401a) to make simultaneous measurements.  What's simultaneous mean to you?  (within the same 1ums/1ms/1s?)  

 

GerdW is correct, if you need both instruments to measure nearly at identical time (<100us) then the back of the Hp34401a has a BNC input labelled Ext IN, and that is the best way to synchronize two instruments to make simultaneous measurement.   From there you would setup both hp34401a triggers in software so that one sends a trigger while the other waits for a trigger then both measure at the same time (i.e. hp34401 #1 sends a trigger to hp34401 #2 then both measure.)  But you mention you have old code that sends a software trigger (>200ms) so lets look at your code..

 

What your code is showing is only 1 instrument being setup to receive a trigger, not two instruments, then you use a low level driver "Initiate.vi" which is either an arm trigger or trigger depending on the context, then you use the old GPIB SEND LIST which sends *TRG to every instrument on the given bus.  But if we look back in your code, the "Configure Trigger.vi" and "Configure Math.vi" are not wired correctly.  Have a look at the connectors and notice that BUS is wired to Internal Level and NOT source.  So the instrument is not set to receive your trigger message at all.  The Configure Math.vi is likewise mis-wired in a few ways.

trig.png

 

 

You could simply use either the newer VISA trigger vi or the driver "Send Trigger,vi" instead of mixing in the old GPIB command.VISA_trigger.png

Now if you want to use 2 instruments in the same program its best practice to have the VIs for each instrument on their own horizontal path, like pictured below.  Also since you will be setting up both instruments almost identically you will want to create subvis (Setup measurements, Setup triggers, etc..) that can be used on both paths.  Doing this keeps things cleaner and you can easily spot which instrument is doing what.  Note the error wire that controls dataflow does not try to do VISA commands in parallel but in sequence one instrument at a time.

2intruments_visa.pg.png

Hopefully that helps clear up a few things for you.  If you explain your measurement, we can help with the code.

 

Craig

0 Kudos
Message 11 of 11
(100 Views)