LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to save PC resource where using DAQmx ??

I have a DAQ 6519.
It is function is to monitor the motor if it in the correct position.(less than 5 micron)
The position may change although the I did not send the command to move the motor(servo motor).
 
That's why I need to always to poll the DAQ.
It make the computer response very low.
 
How to solve such a problem ???
 
Can DAQ return the status I need in stead of poll by myself?
 
0 Kudos
Message 1 of 7
(3,386 Views)

What do you mean by "it makes the computer response very slow ?". I infer that you didn't put your motor position pooling in an independent, dedicated, loop, including some timing delay.

I could be helpfull to explain what you are trying to do, and even to join a simplified vi (remember we don't have servo motors at hand) to illustrate your problem. If you want an accurate answer, you need to ask an accurate question...

Chilly Charly    (aka CC)
0 Kudos
Message 2 of 7
(3,380 Views)
Going by your very brief description I gather that you are looking for a "interrupt" kind of digital input. You need to be notified about the state change of an input without you having to waste resources by polling.  Normally if you need to poll at any frequency less than  20Hz  ( 50ms sampling time )  I don't suppose you need to worry about loading the PC - the modern day P4 processors running at  2+ GHz can handle this like breeze as long as you don't have some memory hogging applications running parallelly.  It is true that  many NI cards do not support interrupts on digital inputs. But with specific cards there are work arounds and you can get some information  here   :   http://forums.ni.com/ni/board/message?board.id=170&message.id=141211

Hope it helped ...

Raghunathan
Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 3 of 7
(3,366 Views)
sorry for my brief description...
 
The program need to monitor the motor.
When the motor move, The program will poll the DAQ for updating the status.
Since the Servo motor will overshot or undershot during moving.
then, after the servo tell me it is in position, I will poll 100ms more.
 
Since my boss do not allow me to use a time delay.
My program will poll the DAQ without delay.
It is terrible to make the system responce late.
 
Is there anyother method to solve the problem ??
0 Kudos
Message 4 of 7
(3,362 Views)
"after the servo tell me it is in position, I will poll 100ms more."

I do not know  what kind of set up will do such a thing. The normal practice to stop a servo is to decelerate and then stop exactly when the "In Position " signal is got. Or alternatively  allow it to overshoot by a finite amount and then return to home slowly so that the home is always approached from the same direction.

If your boss does not allow  Time Delays will he allow a Timed Loop ? As otherwise if you run a while loop without a small delay, then you are bound to tie down the PC - no matter how fast it is.  Actually if  you know the velocity parameters of the servo drive just when it is stopping, you can easily calculate the delay timing for the loop, so that the overshoot remians less than the permitted value.

Looks like you need to spend some more time on the application engineering.

Raghunathan
Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 5 of 7
(3,350 Views)
It is because although the Servo send the in position signal, the motor still not stop.
There are some operations during the servo is in the position. In fact, the motor may move.
 
There why I need to monitor for more 100 ms.
In this 100ms, the machine will perform it operation.
 
If the motor move out of the position, I will stop the operation and wait unitill it to the correct position.
 
In fact, all of this are my Boss's order.
I have told him it may impossible to do.
However, I must do it because he give me the salary....hehe~~^^
 
0 Kudos
Message 6 of 7
(3,348 Views)
"In fact, all of this are my Boss's order."

Maybe. I appreciate your predicament. While you have to obey your  boss , the laws of Physics have no such obligation and therein lies your problem. 

"
although the Servo send the in position signal, the motor still not stop."

Then you should interlock the Servo command with this "In Position " signal through hardware ( relay for instance ).  Otherwise you need interrupt facility to handle this situation if you want  to stop at that point.

raghunathan
Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 7 of 7
(3,344 Views)