LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Computmotor 6K Motion Controller LabView program

Hello,

 

I am using the Viewpoint Compumotor 6k Motion Controller VI's. We have the motion controller plugged in through serial port. I'm looking at the Functions they offer(different VI's), but I don't see any for serial port. They have a VI 6k Communication Launcher.VI, but it looks like that's only for Ethernet connection not through Serial. Does anyone know how to create a connection with serial port. 

0 Kudos
Message 1 of 43
(5,250 Views)

I don't have access to that library, but I found the manual for it here: http://www.viewpointusa.com/6k/6K%20VI%20Motion%20User%20Manual.pdf.  Section 11 indicates that they provide VIs for a serial connection - have you found those?  The ethernet connection provides features that aren't possible over a serial link, so you will not be able to take full advantage of the library.  I've written LabVIEW code to connect to a 6k4 using both serial and ethernet (started with serial, then moved to ethernet when I needed more control) without that library and you can make either approach work.

0 Kudos
Message 2 of 43
(5,232 Views)

I've looked through the manual the serial port VI's don't offer much, the ethernet VI's offer more flexibility it has VI's to move, set distance, set velocities, but the Serial VI's don't offer it. What kind of stuff can be done over Serial, this is my first time using this type of equipment.

0 Kudos
Message 3 of 43
(5,226 Views)

The major difference between serial and ethernet communications is the speed and ease with which you can do certain functions.  For example, if you want to set a variable value on the 6k4 over ethernet, you can do that directly (by sending a packet in the right format, or through functions provided by the Com6srvr ActiveX component (which the Viewpoint library appears to use).  To do it over a serial connection you have to send the command that sets a variable value, which means your computer needs to convert the value into text and send the command, then the 6k needs to parse the text and convert it back into a value.  However, all basic motion control can be done over a serial connection, and for more complex behavior you'll want to write programs in the 6k language and save them on the controller.  Have you looked through the 6k manual and programmers reference?  Have you installed the motion planner software and controlled the 6k manually?  If you don't have the manuals, you can find them on the Parker Compumotor site: http://www.parkermotion.com/products/Controllers__1745__30_32_80_567_29.html

0 Kudos
Message 4 of 43
(5,215 Views)

I have installed the motion planner software, I have the manual the one that you posted in the previous message. Right now, I'm just trying to get the track to move at a certain speed in a certain direction using LabVIEW. They offer a communication VI, the 6k Communication RS232.vi but thats it, I don't know how to set the direction and velocity to get it to move. 

0 Kudos
Message 5 of 43
(5,207 Views)

Can you get the motor to move using the motion planner, using the terminal to enter manual commands?  If so, you can then duplicate this in LabVIEW.  Open a VISA Serial session on the COM port to which the 6k is connected, make sure that the serial settings match (baud rate, stop bits, handshaking, parity, etc), then write text - the same commands that you entered in the motion planner - to the serial port.

0 Kudos
Message 6 of 43
(5,188 Views)

What would you recommend for a beginner with Compumotor, but I'm pretty good with LabVIEW, Ethernet or Serial? 

0 Kudos
Message 7 of 43
(5,146 Views)

The first thing you should do is set up a serial connection, because you'll need it to configure the ethernet connection if you decide to go that route.  Once you have the serial connection working you might decide it's all you need.  You also might want to use serial if you don't want to put your 6k on your local network and you can't get a second ethernet card for your computer.  The commands are the same over either connection so you can switch between them anytime.  Which one is better for you depends somewhat on what you need the 6k to do.

 

If you're interacting a lot with the 6k and response speed isn't critical, the serial connection is fine.  For repeated motions and faster response, the ethernet connection is better.  Initially, I wrote programs on the 6k and ran them by sending the program name over the serial connection.  Each program would print a response to the serial port that LabVIEW could read.  It also provided flexibility for me to write individual 6k commands from LabVIEW when necessary, but it was slow because the 6k takes time to parse text into program names and LabVIEW needed to check the serial port to see if a program finished.  A faster approach is to assign a program to run when a specific input is triggered using INSELP.  That input can be a bit in a variable - a virtual input.  The ethernet communication lets you send variable values directly to the 6k, so you can run a 6k program by sending the right variable value.  Similarly the 6k can send an alert over the ethernet link when motion completes, which is simpler than putting a print command in every 6k program and checking for a response on the serial port.

0 Kudos
Message 8 of 43
(5,135 Views)

Alright it just seems confusing, because the LabVIEW examples that come with the Compumotor. It just seems like they have me select the axis and the speed and distance and it should work, but I can't test it out until i have an Ethernet Connection. 

0 Kudos
Message 9 of 43
(5,122 Views)

Quick question when i use the Serial Write.vi for the write buffer when I enter the code from Motion Planner, can I enter more than 1 line of code into the Write buffer? 

0 Kudos
Message 10 of 43
(5,088 Views)