Showing results for 
Search instead for 
Did you mean: 

Stepper motor control with cRIO and RS 485 connection

Go to solution

Hi Alyssa


I have attached pictures of the State Machine that I tried to build. Changing the flow and transceiver modes did not help. I also attached the resistors that were asked for in the motor manual but no change. I have not received any response from the motor.


0 Kudos
Message 11 of 19

Hi Sidpen,


Could you please post your physical setup? Please make sure we can see the connections on the motor as well as the 9871.


It will be better to write just a simple program that writes a command to the motor and test that out. This will remove any complexity from the overall state machine, and let us know if we can talk to the motor at all with the simplest case.



0 Kudos
Message 12 of 19

BloDFor.JPGThe VI I built for controlling the motorHere is my setup as requested. 20180206_151410.jpgNI 9871 connected to motor with RJ10 cable20180206_151424.jpgTrinamic PD 1140 motor with power and RS485 conenctions20180206_151455.jpgConnections between NI 9871 and the motor




How do you suggest I build the VI to do a simple test of the motor?

0 Kudos
Message 13 of 19



Is the 9871 usually powered when running tests?


You can literally just write a command to the motor and see if something happens.



0 Kudos
Message 14 of 19

I am assuming it is powered when I turn on the power to the cRio. I am trying to send a basic command to see if that works.

0 Kudos
Message 15 of 19
Accepted by topic author sidpen



You must connect an external power supply to the NI 9871 (8 - 28 V). This power supply provides the power for the RS485/RS422 transceivers on the module.



0 Kudos
Message 16 of 19

I attached a power supply as you suggested and I got a reply from the motor. But it still will not move.



Do you have any idea what this means? The firmware manual (page 13) shows this as the reply format.


0 Kudos
Message 17 of 19



I don't really know what the specifics of that mean, but it's good that we can elicit some sort of response from the motor (which I'm assuming hasn't happened before?). 


There could be something wrong with either the connection or the messages we're sending to the motor. I would check out the PD-1140 Getting Started Guide, download the TCML-IDE (link is in the guide), and see if you can get the motor to run using the sample code they provide from the computer, using the USB. This removes the RS485 connection and LabVIEW as variables. If that works, we can then check out LabVIEW/the existing connection and see what's up.


Also, is the drive/motor being powered w/ 9-28 V DC? You should check with a multimeter to verify that it's getting the proper power. If the PD-1140 is powered properly, the green LED should be on.



0 Kudos
Message 18 of 19

Yes, I wasn't able to get any response before. I have used the TMCL IDE to control the motor before. It works great and I used the connection details on that one to configure the VI in labview. Below is a capture of TMCL actually controlling the motor.

TMCL.JPGAlso, the green LED is on and I am using a 24V supply for the motor.

0 Kudos
Message 19 of 19