LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Question (Networked cDAQ chassis)

Please tell me I missed something.  I can't seem to find a "DAQmx Is Device Reserved.vi?"  And for the intended use case, I don't even care who has it reserved if it wasn't this target. 

 

I could try this

Capture.pngCapture1.PNG

But that of course, has the fatal flaw of Releasing the chassis if I already HAD a reservation from this target and possibly leading to a race for resources.  Worse I'm on simulated devices trying to do a POC so I can buy the right Hardware and both the LabVIEW help and DAQmx help a rather silent on the exact error output  (if any) comes from trying to reserve a reserved device with A:) Previously reserved by this target! Is that an error warning or who-cares. B) Reserved elsewhere and "Override? ... False. Error? Warning? nothing?

 

(Some days the help doesn't)


"Should be" isn't "Is" -Jay
0 Kudos
Message 1 of 6
(2,948 Views)

I used a cDAQ-9188 and tried reserving the device with multiple tasks.  Using your method, it never threw any errors, even when the device was already reserved.  This is the same behavior I got when using a simulated device and instead of the real thing.

 

This seems wrong to me…

What device are you simulating or thinking of using at this point?

0 Kudos
Message 2 of 6
(2,881 Views)

I'm looking at a few 9181 with various modules ( Industrial up, CAN interfaces Tcouples...) Distributed at use points but shared between multiple control PC's 

 

The lock would be used to prevent configuring two experiment needing the same endpoints.  If get lock does not return endpoint lock status how is MAX Aware of those locks?

 

I agree that the lack of errors out of get lock without override lock true is a major flaw.  Can you share code MAX screenshots an vi with debugging probes on get lock error out?

 

I may need to get real hw on site with an NI AE rep if LabVIEW can't see what MAX shows in the lock Glyphs.  That cannot remain without a showstopper CAR if we can duplicate you summary finding of no error


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 6
(2,873 Views)

And too reiterate for clarity the desired (ideal) operation would be if  running DAQmx get lock vi: with Override lock=FALSE;

A. Returned successful if no lock existed and a lock was acquired

B. Returned successful with a warning if the PC running that vi already had a lock (points to a bug where this PC should have already released the lock)

C. Returned failed with error stating unable to acquire lock because some other resource has a lock already.

 

I ask because the help files do not address the behavior in those last cases (undocumented behavior I may have to depend on). And, I cannot experiment with simulated network devices.  So, either way I may need to involve NI AEs to notify me if behavior changes occur.  Or help me find methods like MAX currently uses to make my LabVIEW fu rocking


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 6
(2,866 Views)

I think I found what you are looking for.

I was never able to get an error when reserving the chassis on my machine alone.  But once it was reserved by another computer I got the following error using the code from your original VI, just with added error handling (attached).

 Error -21420.JPG

 

I think because the cDAQ-9188 can handle multiple tasks at the same time, it would allow me to reserve the device with both NI MAX and multiple VIs.  But once I tried reserving it, after another computer had it reserved, it threw an error.

Message 5 of 6
(2,845 Views)

Thanks. I'll get back to the rest after looking over the attachment.

 

Locks are machine dependant so get lock vi does exactly what MAX does (hopefully) when you click the glyph

 

Like your​ PC asking the cdaq to "Go steady". If the cdaq says yes, anyone on your PC can take her out for a good time.


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 6
(2,841 Views)