LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interfacing with Parallax servo controller -USB

Unfortunatly, I haven't written a program that does that yet. I attached the manual for the non-usb controller which has the documentation of the posible commands, and tells the string that you will have to sent to query the servo position.
 
Andrew Seltzman
Andrew Seltzman
0 Kudos
Message 11 of 22
(3,287 Views)
I am currently running Labview 8.2 student edition and trying to control a parallax USB servo controller using the VIs I downloaded in this thread.  I am able to control servos using the program that comes with the parallax board, but I can't get any of the labview VIs to work.  One suspicious area is that under the "VISA resource name" a com port is not listed, it currently says "ASRL2:" I have seen screen shots of the VIs working where it lists the port that the controller is on.  When I run it from the parallax standalone software it lists as connected to com port 8.  I've tried both the single and multi servo controlling VIs with no luck with either.  Any advice would be great.
Thanks - Josh
0 Kudos
Message 12 of 22
(3,001 Views)
I would guess it has something to do with the drivers. It woun't work unless you have the correct com port selected under VISA resource. You could try clicking the refresh option on the visa resource drop down menu to see if that will detect it, also make sure you have the VCP drivers for the onboard FTDI usb to serial chipset installed.
 
Andrew
Andrew Seltzman
0 Kudos
Message 13 of 22
(2,999 Views)
I installed those drivers to the default location, restarted my machine and am having the same problem.  When I click refresh in the drop down it stays on the same message.  After I played with the VI a bit I checked in the parallax software and can still interface with the controller over com port 8 with the parallax software.  The sent window is displaying the serial strings, which is motivating.  I looked at the VISA sub vi, tried to refresh the port there as well with similar results.  Is there a way to detect active ports in labview?  Thanks for the quick response.
-Josh
0 Kudos
Message 14 of 22
(2,991 Views)

Do you have the NI-VISA drivers installed on your PC?

Are you sure that Com8 is not still open on the standalone software when you try to communicate in Labview?

0 Kudos
Message 15 of 22
(2,986 Views)
For refference, I have NI-VISA on my system.
 
 
Andrew Seltzman
0 Kudos
Message 16 of 22
(2,983 Views)
IT WORKS!!!  Thanks a bunch guys!  I've never been so happy to see a servo move. 
The problems I was facing were I didn't have NI-VISA installed.  When I installed labview last year I only needed it for some basic VIs that didn't need any i/o capabilities.  I also didn't have the VCP drivers.  The standalone software was closed when I was trying to use labview.  I was just using it to make sure the computer could still communicate with the servo controller.  Thanks for all the help, and the insanely quick responses.  I'll try to contribute here as much as possible!
-Josh
0 Kudos
Message 17 of 22
(2,978 Views)
You're welcome.  I'm glad it was something as simple as that and we were able to get you on your way so quickly.Smiley Happy
0 Kudos
Message 18 of 22
(2,976 Views)
Hello, sorry about bringing up such an old thread, however I feel it is relevent since I am using the create-string program that can be found above. I've been trying to write a program to verify the servo's position as it moves but I'm running into timing errors between the write and read functions. I've read through the parallax manual provided above and have been trying to implement the report position command to little success. I am currently using Labview 8.5 with the parallax servo controller board ver 3.4(#28823). I've already had success at moving the actuator, so I know that the board is recieving proper commands from the computer. I've attached my program below. I'm not sure if the nested for loops is the right way to address the report position command, but I think thats the way the manual says to do it. The error I am getting is "Error 1073807253 occured at VISA Read in Basic Serial Write and Read.vi Possible reason(s): VISA: (HEX 0xBFFF006B) A framing error occurred during transfer".  I looked up the code and it suggested to flush the I/O buffer, but I couldn't get it to work. Any help would be greatly appreciated! Thanks- James
0 Kudos
Message 19 of 22
(2,398 Views)

A framing error implies that there is something wrong with your port settings such as number of stop bits or parity.  You didn't set them in your VI when you configure your serial port, so the default settings of that subVI of 8 data bits no parity 1 stop bit will be used.  Other possibilities would be an electrically noisy signal.

0 Kudos
Message 20 of 22
(2,394 Views)