Jump to content

controlling a motor


Kathrin

Recommended Posts

Hello

I want to controll a motor with LabView through a serial port. I am able to make it move by entering a command in LabView.

With one of them I want to know the position of the motor. So I have to read the answer at the serial port. I am able to give the command to the port but when I want to read the answer I only read the command. :headbang:

How may I be able to make the interface know that I want to read the answer?

I already took some loops to wait but it still does not work...

I looking for some help

cu

Kathrin :-)

P.S.: I added the VI

Download File:post-4227-1140699207.vi

Link to comment
Hello

I want to control a motor with LabView through a serial port.

Take a look at this post and this one too. They both have attachments that do reads from serial ports. This post has an attachment that sends commands to and receives responses from a motor control system over a serial port.

Whose motion controller are you using? What model?

As far as the VI you posted is concerned, you can use a non-zero value in "Bytes at Port" to tell when to start looking for a complete VISA response but do not wire "Bytes at Port" into the VISA Read "byte count" input. Instead, wire a large (256?) constant value to the "byte count" input and setup the VISA read to terminate on a message termination character (usually a carriage return or a linefeed, whichever comes last in the message) as shown in the examples referenced above.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.