LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 50103-

Hey

 

I have a common problem of error 50103 with my programming and I do not know how to get around it and I was wondering if I could get some help with it. I am trying to generate two different signals using DAQmx. One is used to generate a signal for the camera and the other is used to generate a signal for a galvo. Unfortunately, the signal for galvo must change in a loop. My major problem is that the signal for camera has to be outside of the loop and the signal for the galvo has to be inside the loop. Therefore, DAQmx Write and DAQmx Start Task vis must be out side of the loop to operate the camera while array for galvo signal is in a loop after that. Is there anyway of storing the signal for camera outside the loop and run it then add the signal for galvo in the loop?

 

Any help would be very much appreciated.

 

Thank you.

0 Kudos
Message 1 of 13
(3,567 Views)

Why does the signal for the camera have to be outside the loop?

Message 2 of 13
(3,563 Views)

The signal for the camera, DAQmx Write and Start Task vis are currently outside of the loop because the camera initialization component is also on the outside of the loop. When the camera componenet is inside the loop, another error pops up saying that the camera is already being used. Therefore, I had to put it outside of the loop. Also when I put DAQmx Write and Star Task vis inside the loop, the camera does not properly take the pictures because there is not signal.

 

Could you please help me out with this problem? Sorry I'm pretty new with LabView and may not have explained it very well. If anything is not sure about the current state of the VI, please ask and I'll try to answer as thoroughly as possible.

 

Thanks.

0 Kudos
Message 3 of 13
(3,560 Views)

Post your VI here. So, someone may help you rather than descriptions.

The error says about "the resources that you have been used are reserved". So, you may have problems with some other issues.

Message 4 of 13
(3,554 Views)

I have attached a picture of the part of the vi that is troubling me.

The top portion is for initialization of the camera. The middle portion is DAQmx for the camera and the bottom portion is the signal for the camera.

I want to attach another task to a different channel and it has to change with the while loop.

 

Could you please help me with this?

0 Kudos
Message 5 of 13
(3,542 Views)

The -50103 error is typically a DAQmx resource reservation error.  You mention that you are doing a second task.  I assume this is also an analog output task?  If so, is it also being hardware timed?  As far as I am aware, there are no DAQmx supported devices which have more than one timing engine / data FIFO for analog output.  Since you start one hardware timed task outside your loop, that task will reserve the timing engine.  If you attempt another such task inside the loop, I would expect that you would receive this error.  Is this the case?

 

Dan

Message 6 of 13
(3,533 Views)

Hey Dan,

 

I believe that is exactly my problem. I am trying to change the signal to the second channel with repect to the loop and that is why it has to be inside the loop. However, the camera component is outside of the loop because when it is inside the loop, the error pops up saying that the camera is already being used. When the camera is outside the loop, the DAQmx write and start also have to be outside the loop to operate the camera. Therefore, DAQmx is already being used and I cannot add the second channel inside the loop.

 

Is there anyway to work around this problem?

 

Thank you so much for the reply.

0 Kudos
Message 7 of 13
(3,527 Views)

I'm not sure how to advise you without more details about what signals you're trying to generate and how they are supposed to interact with the camera.  In the jpg you attached, I can't see exactly what data you're generating in the bottom right left for loop, but I wonder if you're using analog output to produce a digital pulse (perhaps a trigger for the camera).  What hardware are you using?  It might make more sense to use digital output or counter output if this is indeed what you're generating.

 

How are the two signals you're generating used, and how must they be timed with respect to one another?

 

Dan

0 Kudos
Message 8 of 13
(3,523 Views)

@Mcdan wrote:

I'm not sure how to advise you without more details about what signals you're trying to generate and how they are supposed to interact with the camera.  In the jpg you attached, I can't see exactly what data you're generating in the bottom right left for loop, but I wonder if you're using analog output to produce a digital pulse (perhaps a trigger for the camera).  What hardware are you using?  It might make more sense to use digital output or counter output if this is indeed what you're generating.

 

How are the two signals you're generating used, and how must they be timed with respect to one another?

 

Dan


Hey Dan,

Originally, the bottom for loop created 2 arrays for both camera and the galvo systems. For the camera, the for loop generated digital signals just to turn on and off the camera. For the galvo, the for loop was used to generate an increasing voltage and a decreasing voltage to move the galvo kind of like a door. So when they are synchronized, the camera would take a picture of a sample at different positions controlled by the galvo. 

However, now I am trying to change the movement of the galvo for each snapshot of from the camera. Instead of taking picture of the whole sample at once, I have to decrease the increment and get more pictures of the sample in the same position and that is why I have to put the signal for galvo in the while loop.

 

If I used digital output for the camera Daqmx write and analog output for galvo Daqmx, would the error 50103 still pop up?

 

If there is anything that is not clear, please tell me and I'll try to answer as thoroughly as possible.

 

Thanks

0 Kudos
Message 9 of 13
(3,516 Views)

There are likely several different approaches you can take to solve this problem.  Which DAQ device are you using?  The easiest approach may vary depending on what hardware you have available.

 

In general, you can get around the -50103 error in one of two ways.

1) Use a single timed DAQmx task with both analog output channels.  With this approach, you need to carefully generate the data so that each channel updates to the appropriate values at the appropriate time.  The advantage of this approach is that since both channels share the same sample clock, synchronization between the two channels is already done.  The challenge here then is simply in generating the correct data for each channel.

 

2) Use a digital or Counter task for the camera, and an analog task for the galvo.  This naturally will avoid the resource contention you're running into, but you will need to ensure that your digital output and analog output tasks remain synchronized.  How this is done could differ depending on what hardware you are using.

 

Am I right in assuming that the analog output voltage of one channel directly controls the position of the galvo?

Am I right in assuming that you're using a digital edge to trigger the camera to take a picture?

 

Dan

Message 10 of 13
(3,513 Views)