LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dependant of triggering to update a graph?

A problem with my current problem is that it works under the current test conditions, but I know it will have errors when it is in the actual lab.  Let me explain. 

Currently, I have attached two funciton generators to a BNC-2110 which is attached to this DAQ system in my computer.  The program is able to read in both signals and plot them onto an XY graph and save the data so it can also be displayed on an intensity graph.  I am also able to take a snapshot at a time of the intensity graph or save everything when the save button is on.  The "data" saved is in CSV.

The DAQ is quite a bugger.  In order to control when the DAQ takes in input from the function generators, I can control the number of samples that the DAQ can take it every time it takes an input and there is an trigger that I can control (20Mhz function generator)   So I use a function generator as a trigger to take inputs from two other function generators.  There are error messages whenever I change the frequency of the trigger by a factor of 10, I want to be able to update the XY plot and intensity plot INDEPENDANTLY of rate of the trigger.

Any suggestions?
0 Kudos
Message 1 of 7
(3,118 Views)
Basically whenever I change the trigger rate, the program gltiches and has an error.  To solve the "error" the program tells me to sample more points.

BUT when I use this program to detect high-energy ions, the rate of "data" or ions will not be like the data input from the two function generators.  I don't want the program to want forever and not update because it is waiting to detect an ion.  I want the graphs to update independantly of the trigger.  Even if no need point is detected/added, I want to update the graph.  But I don't know how....
0 Kudos
Message 2 of 7
(3,107 Views)
I think I might have ot tweak with the DAQ and have a conditional.. which makes me update the XY plot and intensity plots no matter what the inputs are.
0 Kudos
Message 3 of 7
(3,099 Views)
Hello Engineer 2450,

There are many options for types of acquisition with a DAQ board.  You can acquire continuously, in a finite manner or sample by sample.  You can also correlate those samples in time to either the onboard clock at a specified rate or to an external, user-supplied clock.

It sounds like you are using one function generator as an external clock to sample the signals on two separate signal generators.  Is this correct?  Do you intend to replace this clock with an ion sensor? so that data is only acquired when a high level is sensed? You then mention that you continuously want to acquire data, which is a slight contradiction.

If this is the case, I would set up the data to acquire continuously at a set rate using the onboard clock.  You can analyze the signal being acquired to determine if you want to log the data or not.  This way the data rate does not change, no errors should be thrown and the graph will continously update.  You can use a case structure for both the logging and graph to control when you want to work with the data. 

It is also okay if you want to have an external clock of varying rates, however you need to adjust your timeout and rate. You will want to have the rate set higher than your fastest expected external clock rate and lenghthen the timeout in case the signals come very slowly.  You can set the number of samples to read to -1 (all available) so that the application will run even if no samples are acquired.

Please post back if I have misinterpreted your questions  or if you have further questions to get your application running as you desire.

Regards,

Jennifer O.
Applications Engineer
National Instruments


Message 4 of 7
(3,089 Views)
The purpose of this program is to detect ions in space.  A detector will be detecting ions when a trigger is used to turn on "detect".  this means we assume there are ions around the detector all the time, and it only detects them ions when the trigger is on.  But, in a case when the trigger is on and there happens to be no ions, we want the graphs/plots to update as usual without crashing.
0 Kudos
Message 5 of 7
(3,073 Views)
The trigger in the actual "testing area" will be controlled by someone, not a function generator set up to determine when to trigger.  Once triggered, I want the DAQ to try to detect the ions/voltage/ whatever and then update the graph no matter what it detected.  So I don't want it to just pause and wait until it detects something to update the graph.
0 Kudos
Message 6 of 7
(3,061 Views)
If I understand you correctly, the trigger is not to trigger your DAQ board, but to trigger the device to sense the ions.  Therefore, you probably want to set up two different tasks for your application.

One task would be to simply output a digital pulse using a digital task or a counter output task, depending on how your device powers on. Then have the analog task use an internal clock at an appropriate rate to accurately measure the signals.  Do not configure a trigger for the analog task.  This way your application will acquire continuously. 

If the device you are triggering needs 5V to be on and 0V to be off, just set up a button which is used to write a high or low to a digital line to turn the device on.

Alternatively if you are wanting to just start acquisition when a user presses a button, then run continuously, set the board to have an internal clock and a trigger off a PFI line.  You can then connect a digital output line to the PFI to start the acquisition or you can even connect a physical switch.  There really are many ways to go about programming such an application and with a little more detail on the timing and triggering requirements I can provide a more complete suggestion.

Regards,

Jennifer O.
0 Kudos
Message 7 of 7
(3,046 Views)