LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger and write multiple channels to file

I am stuck on how to accomplsih my goal.  I would like to use the scope (DPO 7104) to trigger on channel 1. When a trigger on channel 1 takes place I would like to pause the vi and compare channel 1 with channel 2.  If they are similiar within a defined range I would then like to write two waveforms to file.  Basically I am trying to make a coincidence between to channels without using a SCA.  I am somewhat new to Labview and this VISA interface.

My current problem is that I am using the single wave form to trigger an event.  I have it setup the way I would like.  It runs when I have the highlight execution on.  But in normal mode I get a timeout and I don't get a plot.  I am not sure if this the correct way to go about it.  I would appreaciate any feedback.  I have attached my vi.

 

Chad

0 Kudos
Message 1 of 5
(2,597 Views)

Chad_UofR,

 

Hello! Where does the timeout happen in your code? What is the Timeout error that you get?

 

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ben Sisney
FlexRIO V&V Engineer
National Instruments
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0 Kudos
Message 2 of 5
(2,577 Views)

Thanks so much for the reply...I think I figured that part out.  I am stuck on the issue of comparing my waveforms.  I used a index array to break up the four waveforms.  However, when I do the comparison it keeps giving a true statement.  It should be false since I am watching my scope give two different waveforms for Channel 1 and Channel 2.  Is it possible you can look and my code where I do my waveform comparison and see if I am making a mistake somewhere.  Note..my waveforms are negative.  I am so stuck on why I keep getting a true

 

Chad

0 Kudos
Message 3 of 5
(2,573 Views)

Chad,

 

The 'Or Array Elements' function will allways return true as along as the input array 1.) Isn't Empty or 2.) Contains a single true. I attached some code that you can use to test your logic without having to connect to your instrument. It also counts the number of 'True' values in the output array from the 'In Range and Coerce' Function.

 

Also, I think you upper and lower limits on the 'in range and coerce' function may be backwards. You have the Upper Limit multiplied by .75 and the lower limit multiplied by 1.25.

 

 

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ben Sisney
FlexRIO V&V Engineer
National Instruments
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0 Kudos
Message 4 of 5
(2,559 Views)

Hi Ben,

 

Thank you for all the help. I read in the help that when comparing aggregates that it does not matter which is the upper and lower limits.  Of course I did not believe that so I tried both and it did not make a difference.  I then tried making a comparison just max and min values.  Again, this gave me issues.  I am not sure what is causing the Range and Coerce to get confused but when I multiplied by min values by a neagitive to make everything positive it worked.  I have attached my vi so you can take a look.  I am not 100% sure what is going on but it is working.  I will look at your attached vi also.  Have a good weekend.

0 Kudos
Message 5 of 5
(2,552 Views)