LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Lock and unlock sharing DAQ PCI-6036E

Is there an example for lock and unlock a DAQ resource (PCI-6036e)? I'd like to protect it from different threads.
0 Kudos
Message 1 of 4
(2,837 Views)
If you are using NI-DAQmx, each resource (e.g., analog input subsection, digital port, counter, etc.) on a device will be reserved when it is being used in a DAQmx task and will not allow other DAQmx tasks, potentially in other threads, to access it. So, in most cases, you don't need to add any additional protection.

If you want to lock a resource on the device even if you are not using that resource, you can create a DAQmx task that would use that resource and invoke the DAQmx Control Task VI to explicitly reserve the task and, by extension, the resource. This would prevent other threads from creating other DAQmx tasks that would use that resource. If this describes your need, I would be interested in hearing more details about your application.

If you only
want to protect a resource on the device from threads within your LabVIEW application, you can use the LabVIEW synchronization VIs (refer to the Advanced->Synchronization->Semaphore palette).
--
Geoff Schmit
Huskie Robotics, FIRST Team 3061 Lead Mentor
http://team3061.org/
@team3061
Message 2 of 4
(2,837 Views)
Well, I have LabVIEW 6.1 and TestStand 2.01f
Does NI-DAQmx come with LV7?
My application has one serial port,one PCI-6036E connecting to one SCXI with 16 thermocouple and 10 force sensors.
motor controller pc board (MC)

PC with TestStand and LabVIEW (master)
| |
RS485 COM1 PCI-6036E
----------- ----------
| | | | SCXI CHASSIS
slave MC1 MC2 MC3 MC4 TEMPERATURE SCXI-1102
| | | | | | | | Strain gauge SCXI-1520
Stepper 1-3
Brushless
The PC is the master,
MC1 2,3,4 are slave motor controller, they don't initiate communication but they take a command and execute it and they can return mo
tor status encoder position.
MC1 can controll four motors, serial command has MC1 address and individual motor sub-address.
The four motors connect to MC1 are stepper and small.
The motors connect to MC2 are brushless type
The two motors connect to MC3 are stepper and medium size. Different manufacturers, but they all have encoder feedback and take about 4 - 15 seconds to move to commanded position.
Strain gauges for measuring the force of the linear motors. Most motors have one strain gauge, but three motors have two strain gauges. (Fwd 1 inch with 8psi to a cork screw, once finding the corkscrew resistance, punch thru it with 50 psi and 1/2 inch)
The test is life analysis and motor force.
The test cycles the motors continuously and collecting data (encoder, temperature, force, cycles)
What are the ways for doing the test?
How should the graphical User interface be? this is the thing that the project managers care about. Only three seconds to impress them.
0 Kudos
Message 3 of 4
(2,837 Views)

Yes, NI-DAQmx ships with LabVIEW 7 Express.

I'm not very familiar with TestStand. I would encourage you to browse the TestStand examples, the Code Library, the Test Stand Development Library, or post a question to the TestStand Discussion Forum.

--
Geoff Schmit
Huskie Robotics, FIRST Team 3061 Lead Mentor
http://team3061.org/
@team3061
0 Kudos
Message 4 of 4
(2,837 Views)