03-26-2012 08:34 AM
Hi,
Can anyone confirm if DAQmx allows you to access the same task across different executable files? The current setup I have is to use two sepparate programs to read a total of 6 channels of analog input. The first program reads on channels ai0,ai1, and ai2, while the second program reads on channels ai3,ai4, and ai5. These two programs would run at the same time and they'd be "competing" for the same task but never the same channels. There is no overlap in the channels, but for some reason I can't seem to be able access the same task at the same time, not even for reading.
I know Traditional DAQ allowed this without any issues, and I cannot figure out why I can't replicate the same setup with DAQmx.
03-26-2012 12:30 PM
Forgot to add: DAQ card used is PCI 6023E
03-27-2012 03:26 PM
Hi Vlad,
I believe you'd be able to set up one task and use two separate executable files. I could see there being some issues with them ran at the same time though. This could be due to starting the task multiple times, and you'd probably get an error saying that the resource is reserved. Are you getting an error for this, or how are you telling that there is an issue?
I'd be interested in seeing a screenshot of how the task is configured in MAX as well as how the VIs are set-up. Are you able to run the executables by themselves? If so, is there any way you can combine the two into one .exe?
03-29-2012 07:45 AM - edited 03-29-2012 07:55 AM
Hi Lea,
Yes I'm seeing the resource is reserved error quite often when both executables are running. I tried many different things including setting up case statements to stagger each executable. I also tried setting up a task in MAX instead of the VI itself. So my aquisition vi is now incredibly simple (since the task exists in MAX), it just consists of a DAQmx Read vi. It just seems like it's not possible to straight up access the DAQ card at the same time from multiple executable files even if I'm looking at different channels with each program (I'm using a PCI 6023E DAQ). What bugs me is that this didn't seem to be an issue with Traditional DAQ (it seemed like both programs were accessing the same device at the same time). I guess the architecture of Traditional DAQ and DAQmx is just totally different and DAQmx got rid of this functionality.
I'm thinking now of just using a different approach and run a single program that constantly aquires data from 6 channels prior to launching the two executables that try to read 3 channels each from the DAQ. What I'd like to know if there is a way in LabView programming or MAX to share the results of a task (ie: 6 double values from analog input voltage channels) across different executables? Would shared variables work? This way, only one program is accessing the DAQ card and reads all 6 channels, while the other two executables access shared results and take 3 channel results each without directly accessing the DAQ.
Thanks
03-29-2012 09:19 AM
03-29-2012 09:51 AM
I guess I didn't want to accept the fact that I need to make a "middle-man" program instead of being able to directly access any task I want as in the good old times.