01-19-2006 01:32 AM - edited 01-19-2006 01:32 AM
I am trying to write a multi-purpose vi for students to use for acquiring and recording strain, thermocouple, LVDT, and DC voltage signals as needed by their experiments. We have a setup on wheels with a PCI-6052E card cabled to an SCXI 1001 chassis with the following modules installed: four 8-channel strain modules (SCXI-1520), one 32-channel thermocouple module (SCXI-1102), one 8-channel LVDT module (SCXI-1540), and a SCXI-1180 feedthrough panel with SCXI-1302 terminal block. So I would like to be able to read as many of these channels as the user selects, including some voltage signals that don't need conditioning (like the 0-10V output for force off an old Tinius Olsen machine) that I planned to connect using the feedthrough panel. Then I would like to add the ability to trigger the recording of data by user button push or a digital trigger signal from an MTS Flextest servohydraullic controller running MPT. Finally, I would like to add the ability to take any few of these signals and output them as custom scaled analog outputs to be used by external devices.
I'm taking this one step at a time since I am new to Labview. I started by finding an example that did multiple strain gages how I wanted (with automatic bridge nulling, lowpass filter, and shunt calibration functionality) called "Cont Acq Strain Samples (with Calibration).vi". I first rearranged the controls so I could group channel configuration controls on tabs for each sensor type (more controls will be added later). Then I added preliminary functionality for recording an lvm with a button press. Everything worked fine as I tested with 2 strain gages wired up.
Next I decided to bring in LVDT signals. I wired up our only 3 LVDTs (for now) and configured global virtual channels in MAX for each (these will rarely be reconfigured so there is no need to allow the user to change parameters using front panel controls, just select which ones to use). I added a DAQmx Global Channel name control to the "LVDT" tab and added a name filter so only global LVDT channels would be displayed. This way the user can select any number of the 3 available LVDT global virtual channels to use. On the block diagram, I added a DAQmx Create-Task with the selected global virtual channels wired in immediately before the DAQmx Create Channel (AI Strain Gage) that was there from the original example code. Thus combining the strain and lvdt sensors into the same task.
When I try to run I get an error (Error -200077 occurred at Property Node DAQmx Channel (arg 2) in alex_strain_LVDT_v4.vi) because the property node that was setting the lowpass filter for the strain channels is now trying to do the same for the LVDT channels which don't have that option. I suspect a similar error would occur if the program hadn't aborted and began strain bridge nulling and shunt calibration.
So my question is how do I get around this? Can I somehow configure that property node to only change settings for the strain channels? I've found plenty of NI support entries explaining how to use a single task for multiple AI measurement types (including DAQmx Task Example_Configuration.vi) after I ran into conflicts with reserved resources trying to use seperate tasks. But none of these examples address my problem of wanting to change properties for only select channels in the task.
Message Edited by sdsmt_alex on 01-19-2006 01:32 AM
01-19-2006 01:49 AM
Hi,
The simplest solution is to do as shown in attached VI
In while setting the lowpass filter, include an extra property node on top, for 'active channel' and pass the strain channel's channel name to it
Now this property will be set only for those strain channel names.
Regards
Dev
01-19-2006 07:25 PM
Thanks Dev,
I got that part to work and then wired the same subset string into the channels input of the 'DAQmx Perform Bridge Offset Nulling Calibration.vi' for a similar effect on the bridge nulling portion.
Now I run into a similar problem if shunt calibration is enabled. An error message comes up telling that it can't modify the AI.StrainGage.GageFactor property on an LVDT channel. My code calls the 'subSCXI Multi-Chan Shunt Cal.vi' which doesn't have a channel/active channel input so that I can specify only strain channels for shunt cal.
Does anyone have any ideas how I can get the shunt calibration to only happen for strain channels in a task with other channel types? The 'subSCXI Multi-Chan Shunt Cal.vi' calls many sub vi's so it would probably take a lot of work to sort through and modify them to fix this problem.
Any advice would be appreciated.
Alex