Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -200524

Hi

I'm really at a dead end at this moment in time. I have a code (see attatchment) that basically takes a video and then using IMAQ it processes each frame so it can track a set of particles. the three cameras are connected to three servomotors aligned in three axis. To power the motors i am using a myDAQ device with the 15v wired to a motor board.

 

Now there are two questions, firstly to control the voltage going to the motors im guessing i use the AO on the myDAQ front, would i be better using a cRio for this application?

 

secondly when the code gets to the Write DAQmx it states that there are too many channels in the data; the data has 3 channels and the task only has one. How do i tackle this problem

 

Cheers

 

Mike

0 Kudos
Message 1 of 7
(6,783 Views)

Hi Mike,

 

I have looked at your code and there is a few sub-vi's missing but I can see the general flow and concept behind it. Can you confirm you hardware setup. As a myDAQ only has 2 Analogue outputs and 2 Analogue  inputs you will get an error because there is not enough physical channels to run your code.  Please post back with your hardware setup, I will then be able to advise as to the cause of the issue.

 

Matt Surridge

National Instruments
0 Kudos
Message 2 of 7
(6,762 Views)

I think I realise what you are saying. I have three cameras attached to the computer and these cameras should be moved with three motors. I have attached the motors to a motor control board which in turn is attached to a myDAQ. I want the myDAQ to output varying analog signals of voltage to control the motors. I created a task using the DAQmx assistant and I received an error saying the data contained 3 channels (the x, y and z motor positions) but the task only contained 2 channels (AO0 and AO1). Could this be tackled by using two myDAQ's or would that not help. would I be better off using a cDAQ instead?

 

0 Kudos
Message 3 of 7
(6,760 Views)

Hi Mike,

 

You could use two myDAQs (two motors in myDAQ one and one in myDAQ 2), or a cDAQ with an AO module.  Both ways will work there will just be some small code changes needed between the two systems. This will stop the error you are receiving due to there not being enough channels.  If you have any further questions then please feel free to post back.

 

Matt Surridge

National Instruments
0 Kudos
Message 4 of 7
(6,758 Views)

Thanks for the quick reply. However i now have another problem. How can i make the channel from the second myDAQ coincide with the same task as the other two?

0 Kudos
Message 5 of 7
(6,754 Views)

Here is the subvi that deals with channel setup

0 Kudos
Message 6 of 7
(6,753 Views)

Hi Mike,

 

You will have to have a seperate task for the 2nd myDAQ as they connot be configured in the one task.  If you move to a cDAQ then there will be enough outputs on one module to control all 3 motors.

 

Regards

Matt Surridge

National Instruments
0 Kudos
Message 7 of 7
(6,737 Views)