LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Encoder counts to controller - error

Hello everyone,

Could someone please help me with this LabVIEW program? I thought I was near complete with finishing up this project, but have encountered problems while executing the program with hardware. I am under a very close deadline, so any tips or advice is very much appreciated. 

About the program:

I have a sub panel that represents an x-y stage where a mouse cursor navigates about. The x-y stage is controlled by two actuators, and a mouse cursor's movement within the subpanel will allow for the actuators to move about.

 

There are three different cases (case structure):
0: Do nothing
1: Update mouse coordinates (x & y coordinates are displayed in boxes titled "Local Mouse Coord")
2: Display absolute position (x & y coordinates are displayed in boxes titled "Encoder counts")

My program currently works so that the mouse coordinates (in pixels) are updated and displayed ONLY when the cursor is within the panel's bounds. I did this by implementing the In Range and Coerce Function.  

Screenshots of my current sub panel and block diagram are in the attachments below. 

(Note: Coord to Encoder on the Front Panel is supposed to be at 500 to attain encoder counts) 

 

Sub Panel

 

 

I have two axes where one axis represents x and one axis represents y. These axes are controlled by actuators connected a Newport MM3000 Motion Controller. 

 

Once I had my program running and the controller was turned on, the program would only execute partially for Case 2 (encoder counts). 

  • Moving the mouse cursor up and down within the subpanel allowed for some movement on the actuator for axis 1 
  • Moving the mourse cursor left, right, and diagnol caused an error on the controller called "Bad Command"; there was no movement on the actuator

Below is a zoomed in version of my Case 2: 

Screen Shot 2012-11-08 at 8.36.57 PM.png

The front panel and block diagram for "IEEE Write" is below: 

Screen Shot 2012-11-08 at 8.37.11 PM.pngScreen Shot 2012-11-08 at 8.37.19 PM.png

 

As you can see in the front panel of IEEE write, 1pa1000 represents a command that will move the actuators to absolute position, where 1 represents the axis number and 1000 represents the absolute position destination (in encoder counts). 

 

I know that no one will probably be able to implement this without the hardware. However, if anyone has dealt with similar issues before, could you please lend me a guiding hand?

 

I just need to know what I could do to modify my code to elminate the "Bad Command" I am getting from the controller. 

 

Many thanks in advance! Smiley Happy

 

0 Kudos
Message 1 of 2
(2,483 Views)

qpt,

 

I would definitely recommend contacting the manufacturers of your Newport MM3000 Motion Controller to check and make sure the commands and the command protocol that you are sending the device are compatible with the controller. They might have some more insight as to why you are recieving this error. 

 

Regards,

Leah

0 Kudos
Message 2 of 2
(2,465 Views)