LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Power Supply Control subVI using state machine

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.

 

0 Kudos
Message 1 of 4
(2,405 Views)

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

Message 2 of 4
(2,398 Views)

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

Message Edited by gastro54 on 10-15-2009 02:46 PM
0 Kudos
Message 3 of 4
(2,384 Views)
0 Kudos
Message 4 of 4
(2,377 Views)