10-08-2007 05:31 PM
10-10-2007 08:18 AM - edited 10-10-2007 08:18 AM
Hi Nick,
You can perform this task in either LabVIEW SignalExpress or LabVIEW 8.2. Since you started with LabVIEW SignalExpress, I will continue with this and we can change later if needed. The 9215a can samples at 100kS/s (9215A Specifications, p12 - see picture), therefore if you would like to acquire 100ms of data at a time, you are correct - we would need to collect 10K samples.
To do this, in the DAQmx Acquire step, we will set the acquisition mode to ‘continuous’, ‘Rate‘ to 100K, and ‘Samples to read’ to 10,000. Next, use a ‘Statistics’ step (Insert After >> Analysis >> Time-Domain Measurements >> Statistics) to obtain the ‘mean’ value of the 10K samples just acquired. Go to the ‘Configuration and Results’ tab, and check the box for ‘Mean’. Lastly, Insert a step to Save the data (Insert After >> Load/Save Signal >> Analog Signals >> Save to (choose type) ). In the ‘Signals’ tab of the ‘save to’ please make sure to remove the original signal, and add in the signal for ‘mean’ which is being calculated in the previous step. (See picture below) Also make sure to configure the parameters in the ‘File Settings’ tab.
Regards,
Message Edited by David L. on 10-10-2007 08:21 AM
10-10-2007 01:01 PM
10-11-2007 10:30 PM - edited 10-11-2007 10:30 PM
Hi Nick,
Let’s start with LabVIEW SignalExpress: When saving a file, you could choose ‘Next Available File Name’, but this will create a new file every time the ‘Save File’ step is run. This means that if you choose ‘Run’ (as compared to ‘Run Once’), than a new file will be created every time the step is run and you will have a large number of files when all is said and done. I do not believe this option best suites your project. This is the only way to create a new file programmatically when using LabVIEW SignalExpress, otherwise you can rename the file by hand manually before every run.
In regards to scaling in SignalExpress, all channels can be scaled separately by implementing a different scale for each channel. The picture below demonstrates adding a customer scale for AI0. The same can be done with the other channels, using a separate scale for each one. This does not only apply to LabVIEW SignalExpress, but all DAQmx tasks created in Measurement and Automation Explorer and LabVIEW.
When using LabVIEW, please see the shipping example ‘Cont Acq&Graph Voltage-To File(Binary).vi’ (Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Analog Measurements >> Voltage). When you leave the ‘File Path’ control empty, than every time the VI is run the user will be prompted to enter a file path, and you can create a new file. This new file will be written to until the VI is stopped. The following knowlegebase will assist with implementing a scale in LabVIEW, Programmatically Create a Custom Scale in DAQmx.
Message Edited by David L. on 10-11-2007 10:30 PM