Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA Serial 2012

Solved!
Go to solution

Hey all, 

 

I have been working with LabVIEW 2011 to develop a program to drive a motor via the VISA Serial block. I have since upgraded to 2012, and I have been having problems getting the LabVIEW program to recognize the motor. I have a 3rd party program installed that I can use to send basic signals to the motor, so I know that all drivers are installed correctly and there is no communication errors between the motor controller and the computer.

 

Has anyone had this problem before? My suspicion is that there may be a compatibility issue with serial communication between the 2011 and 2012 labview versions. 

 

Any help is greatly appreciated!

0 Kudos
Message 1 of 5
(6,375 Views)

Hi PML,

 

Can you please post a code snippet of how you are doing your serial communications? One thing to try is make sure that the string in the write buffer is set to slash code display. You can change this by right clicking the string control/constant and choose '\' code display. The default string representation is ASCII and thus this does not include non-displayable characters and so "\r\n" which usually indicates a carriage return will not display in normal ASCII representation. You can read more about it here http://digital.ni.com/public.nsf/allkb/57091EF5D37E2CF5862571B100583FED?OpenDocument

 

If that doesn't work, are you able to communicate using the shipping example, Basic Serial Write and Read.vi? You can access this example by going to Help->LabVIEW examples->Hardware Input and Output->Serial->Basic Serial Write and Read.vi. Please let me know if you can talk to the motor with that example.

 

Regards

Doug W

Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(6,350 Views)

Doug,

 

Thanks for the reply. I will give the basic IO an attempt. The code is in multiple subVI's so it's sort of diffuclt to convey the full idea of what I'm doing, but I've attached an image of the core of the program. The "I/O" block into the VISA Serial (on the front panel) would previously update with all available COM ports to choose from (when I was using 2011.) Now that I've moved the program to a new machine running 2012, this block doesn't update with the available ports. 

 

 

Phil

0 Kudos
Message 3 of 5
(6,322 Views)
Solution
Accepted by topic author pml13

Hey Phil,

 

Thanks for the screenshot. At first glance, there doesn't look like anything suspicious is going on. That being said, let me know when you run the shipping example if you are able to see the available COM ports.

 

One other thing to check is to make sure you have VISA installed on the new machine. You can check under the National Instruments folder in your start menu. If it's not there, you can download it here http://search.ni.com/nisearch/app/main/p/bot/no/ap/tech/lang/en/pg/1/sn/catnav:du,n8:3.1637,ssnav:su... . Also can you check and see if the COM ports show up in Measurement and Automation Explorer? Let me know if any of these suggestions resolve your issue, otherwise we'll keep troubleshooting.

 

Thanks

Doug W

Applications Engineer
National Instruments
0 Kudos
Message 4 of 5
(6,297 Views)

Doug,

 

Late last night I installed the VISA drivers which ended up solving my communication problem,and my COM ports showed up immediately. My motor is responding to my signals and things are looking good.

 

Thanks for your help!

Phil

0 Kudos
Message 5 of 5
(6,293 Views)