LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with stepper motor via RS485

Hi! I've started using labview only recently and I have a problem.
I should try to develop a program that should have different functions, including moving a stepper motor.
to get an idea of how i should do it I've downloaded the program provided with the motor, which allows you to move it (see "positionsmodus") and after the appropriate modifications I have been able to make it work (there was a problem with the baud rate and once the program stopped the connection remained open so I wasn't able to use the motor with other programs). now I'm trying to create a program on my own, which is basically a small version of the program that I've downloaded (I don't need all those commands!).
I know that the commands that i'm trying to send are correct and when I run the program I don't get any error (I also tried to use NI Spy, but it always tells me that everything is correct), but the motor does not move.
the only thing that makes me think is that nothing comes out from the "I / O assistant": if I run the program displaying the various steps, the wire that exits from I / O assistant remains gray.
 
does anyone have any idea?

 

info:
 
- labview 2010 
- stepper motor: PD4-N59 (http://en.nanotec.com/PD4-N59.html) connected via RS485 (+ usb adapter)
 
thanks
 
Bye!!

Download All
0 Kudos
Message 1 of 4
(2,603 Views)

Hi,

- First try to use Error Handling in LabVIEW. Otherwise you're not able to see any errors. http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/using_error_clusters/

- Use the highlight modus to see where error can occurs. See LabVIEW Help how to use debugging tools

- Delete both instrument assistants outside the while loop and wire the device control directly to the instrument assitant inside the while loop.

 

Without any hardware i can't do any tests for you. Have a look into the NI Example Finder (LabVIEW->Help->Example Finder). Maybe you can find an example which matches to your device.

 

Cheers,

Philip

0 Kudos
Message 2 of 4
(2,567 Views)

Hi, thank you for your reply!

so, I've already solved some of the problems (such us for example the "grey wire"), and basically there isn't any error in the program.

I've also used NIspy to see if there is some problem in communication and I've noticed only one thing: when I run the program provided by the company the motor reply whitout th last part of the message that I've sent so for example, if I've sent the command #1A\r, I'll get #1A, but if I run my computer it will reply sometimes with #1A\ or even #1A\r... this happens not in the first instruments I/O assistant which works well, but in the second instrument assistant... and obviously I know that the commands are well written, because they are the same in both programs and I'm also using the same parameters and properties in both I/O assistant.

 

do you have any idea? do you think there is a problem in my program or that it is an hardware problem?

 

thank you!

 

bye!

0 Kudos
Message 3 of 4
(2,550 Views)

I've solved the problem.. it seems that it didn't like the "\" inside of the command, so I have to copy it from the program provided by the company!

 

bye!

0 Kudos
Message 4 of 4
(2,529 Views)