LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

negative analog trigger voltage

Hello,
I am currently working on a program in Labview 6.1 with two E-series devices acquiring data simultaneously.  I am currently using a analog channel to trigger the acquisition.  My application uses a signal that has both positive and negative voltage sources.  Right now, when I set a voltage, the devices wait until the voltage level is reached before acquiring data.  Well, if I am relying on a voltage that is always going to be negative, that value will never be reached.  I guess I need to take the absolute value of the voltage coming from the trigger channel and then trigger if the absolute value reaches a preset value.  Can anyone help me with this?

Thanks a lot,
Taylor
0 Kudos
Message 1 of 7
(3,301 Views)

Taylor,

Since you are using an analog trigger, you should be able to set the analog level in the AI Start vi.  I have attached a vi with just the AI Start.vi and the needed settings for what you are trying to accomplish.  Let me know if this helps.  Thanks and have great day!

Regards,

Lon

0 Kudos
Message 2 of 7
(3,290 Views)

Taylor,

Sorry, that was done in 7.1.  Here is a Picture of the configuration.

Regards,

Lon

0 Kudos
Message 3 of 7
(3,285 Views)
Thanks for the response.  That is very similar to the way that I have mine set up.  However, this is the problem:  let's say I set the analog trigger to begin acquisition when the trigger channel reaches 0.1 V, but the trigger source always has a negative value for the voltage (for example: a strain gage that is being loaded in compression), which will technically never reach 0.1 V.  It may reach -0.1 V but never +0.1 V.  How can I overcome this problem.  Is there any way to set it up so that the software compares abs(trigger_voltage) to trigger_level instead of simply comparing trigger_voltage to trigger_level?
0 Kudos
Message 4 of 7
(3,273 Views)
Hi Taylor,

What I believe you want to do is actually set your analog trigger level at -.1 Volts and set your trigger to start on the falling edge when the voltage crosses this threshold.  When your negative readings go from above -.1 V to below, it is a negative slope, and this is the definition of a "falling edge" trigger.  As Lon showed you in his VI/picture in his last post, the AI Start.vi has an input terminal for the "trigger slope," which he has wired a "falling" constant to in his VI.  The key is that this "trigger slope" input parameter determines which direction of "crossing" the threshold will actually trigger your acquisition.

Thaison V

0 Kudos
Message 5 of 7
(3,255 Views)
Okay.  Thanks for clarifying, that makes sense.  Now, I have wired it up where you can set the trigger type to 1 (for rising) or 2 (for falling).  And I also have it where you set the level.  So when I select 2 (for falling) and set the voltage to say -.1 it still doesn't trigger.  For example, using a battery with the polarity reversed to trigger.  However, if I set it to 2 (for falling) and set the voltage to +.1 it will trigger if I have the battery wired to the proper polarity, the only difference is that it triggers when disconnecting the battery from the trigger channel, because this is when the battery would cross the +.1 threshhold on the way down, which makes sense.  So do ya'll have any ideas why it wouldn't work when I set a -.1 value?
0 Kudos
Message 6 of 7
(3,242 Views)

When does it trigger if you read the negative side and have a positive value for the level?  Perhaps you can post a simplified version of your vi that exhibits this behavior for us to take a look at. 

Regards,

Lon

0 Kudos
Message 7 of 7
(3,228 Views)