10-15-2009 02:07 PM
Hi,
I am trying to create a subVI that controls a HV power supply via a DAQmx NI USB-6259 board.
I am having a couple of issues:
1. Everything works fine when I start the VI, but when I enable the interlock, everything goes well, then I get this error once the loop stops:
Error -50103 occurred at DAQmx Read (Analog DBL 1Chan 1Samp).vi:2
Possible reason(s):
The specified resource is reserved. The operation could not be completed as specified.
Task Name: _unnamedTask<184>
2. I ultimately want to use this VI as a subVI in a larger program. When I put the subVI in an external program, the voltage and current output values do not seem to update as the subVI is ramping up the output voltage. Is there any way I can get it update in real time?
3. The ramp up stage of the program seems to run slowly. I haven't put any delays in that would cause it to run this slow. I don't want to increase the increment per loop to speed up the ramp; I'd rather just increase the speed at which these increments occur.
10-15-2009 02:19 PM
Your error is extremely common. Did you not search for the error code or error message. Even looking through the board for the last couple of days you would have seen the same problem reported by other begginers.
You simply cannot have more than one task with a single hardware resource. Combine your separate analog in and analog out tasks into a single analog in/analog out. For each task, define multiple channels i.e. Dev 1/ai0:1. Your DQmx Write task has to change to NChan
10-15-2009 02:41 PM - edited 10-15-2009 02:46 PM
You're right - that is the problem; thank you. I should have searched for the error code.
I've now solved problem 1.
Here is the updated VI
10-15-2009 02:54 PM
For #2, have a look at this tread:
http://forums.ni.com/ni/board/message?board.id=170&message.id=305687