LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stepper motor control with cRIO and RS 485 connection

Solved!
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.

FroFor.JPGBloDFor.JPG

0 Kudos
Message 11 of 19
(1,807 Views)

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.

 

Bdog

0 Kudos
Message 12 of 19
(1,790 Views)

The VI I built for controlling the motorThe VI I built for controlling the motorHere is my setup as requested. NI 9871 connected to motor with RJ10 cableNI 9871 connected to motor with RJ10 cableTrinamic PD 1140 motor with power and RS485 conenctionsTrinamic PD 1140 motor with power and RS485 conenctionsConnections between NI 9871 and the motorConnections 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
(1,786 Views)

Sidped,

 

Is the 9871 usually powered when running tests?

 

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

 

Bdog

0 Kudos
Message 14 of 19
(1,781 Views)

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
(1,778 Views)
Solution
Accepted by sidpen

Sidped,

 

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.

 

Bdog

0 Kudos
Message 16 of 19
(1,773 Views)

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

resp1.JPG

 

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

resp2.JPG

0 Kudos
Message 17 of 19
(1,767 Views)

sidpen,

 

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.

 

Bdog

0 Kudos
Message 18 of 19
(1,759 Views)

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
(1,745 Views)