Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

sending commands to USB Servo board with NI-VISA/MAX

Hi,
I have a ACS USB-Servo-II board and a program written in Visual C++ to control servos. However, I would like to create a program in Labview to control the servos with the commands written in VC++, which means I have to first somehow establish communication between the USB servo board and Labview.
Now, I followed NI tutorials that explain the procedures to connect a RAW USB device using NI-VISA by creating a inf file and thus the driver which helped me list the USB RAW device under "USB Misc. resources" in MAX and VISA. however, I am still unable to establish a communication with the USB servo board and NI-VISA. In the VISA session window, what commands do I need and where should I input them in order to send data to the USB servo controller?

Because if I am getting this right, I first need to establish a communication link between USB device and MAX/VISA in order to make it run later with a Labview program that has the C++ programs to control the movements of the servos.

any prompt help on this question would be greatly appreciated.
thank you.
0 Kudos
Message 1 of 3
(3,676 Views)
Hi ShahN,

If you are simply wanting to call the Visual C++ functions from LabVIEW to control the USB board, and if the Visual C++ functions are already working and communicating with the board, then you do not need any extra steps to control this hardware. I am assuming that the C++ code you have was provided by the manufacturer or the board, and they have implemented a method to communicate with the device, and they know exactly what commands to send. If this is the case, then you can just call the C++ functions from LabVIEW.

Using the Wizard to create an inf file for the devices and making the device a USB RAW device is a very useful utility, but only if you are going to be communicating with the device directly from LabVIEW. Creating this inf file makes VISA the driver for the device, and then you can use the MAX interface or the VISA Write and Read functions in LabVIEW to communicate with the device. However, you will have to have knowledge of the device to know exactly what commands to send to have the device respond as you expect it to.

Hope this helps!

john m
Applications Engineer
Message 2 of 3
(3,662 Views)

Hello ShahN,

 

I have the very same servo controller, were you able to write a code on LabVIEW to control the movements of the servos?

 

Thank you!

0 Kudos
Message 3 of 3
(3,379 Views)