Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

NI 9871 write message reflecting for read message

To the community,

 

I have been working with a cRio-9014, with a NI 9871 RS495 card installed to communicate with a Dynamixel XM540-W270 motor using the NI Dynamixel Package with some updates for the different addresses. 

 

The Issue that I am having is that the signal sent to the motor is reflecting back as the read message. So whenever I try to read anything back its just the sent message that i was trying to send. I have also tested this with a seperate motor controller and motor and had the same result which has led me to believe that it is something with the cRio or NI 9871 itself that a setting I am just not currently setting. 

 

The dynamixel is a 2 wire RS495 so I have wired the cRio side to work with this and added the enum to choose the 2 wire connection but this acutally makes it to were the motor wont even connect to labview in the first place.

 

All the code I have used is in the NI package the only change I have made was to the starting address and to fix a broken VI that had some extraneous wires in it. Otherwise nothing else has been touched. 

 

Hopefully someone can have an idea for what is going on. And any questions on the setup, wiring, and code please feel free to ask.

 

Thomas

0 Kudos
Message 1 of 5
(2,602 Views)

You mean RS485 right? Reflection is unusual and sounds more like a 488 wiring or something. I think you're on the right track with the 2 wire setting. If it won't communicate, you want to follow standard COM debugging practices.

 

  • What does "can't connect" mean? Just that you get no response?
  • Check your error output on the write.
  • You might have to recompile the FPGA and deploy to get to accept the 2 wire setting. Some modules/chassis need this and some don't.
  • Check the baud rate is set correctly
  • Try a cheap USB to 485 adapter and RealTerm or something that can send binary.
  • Use an oscilloscope to check the signals
0 Kudos
Message 2 of 5
(2,577 Views)

Yes I meant RS485 sorry for the typo.

 

First Bullet Point - By "can't connect" I mean I am not able to open the port and it send the timeout error in the   labview programming, when I use the 4 wire I get a different error saying no motor response was collected.

Second Bullet Point - I don't typically get an error on the write command when using a 4 wire output, on 2 wire the error I get is a timeout error.

Third Bullet Point - I am currently running my cRio in scan mode, are you saying I should be in FPGA mode.

Fourth  Bullet Point - Yep checked this a lot just to verify it was correct, so far I think its been correct since all my settings have been at 57600.

Fifth bullet point - I have a CNV-100 Cyber Sciences converter but this doesnt seem to change anything
6th point - Haven't tried this yet but will look into later today.

 

 

Thanks for the input I really appreciate all your help.

0 Kudos
Message 3 of 5
(2,569 Views)

 You get a timeout on the "write"? that seems weird. Post the error text.

 

Sorry, I don't have as much experience with the scan engine mode. It should all just work but maybe there's a "right click, deploy" that you need to do.

 

If you're looking for things to try, you could try FPGA mode and see if you can find an example deploying the bit file or configuring the 4 vs 2 wire mode.

 

By USB to 485 converter I mean something like this: https://www.ni.com/en-us/shop/model/usb-485.html There are third party vendors that also sell very similar devices.

0 Kudos
Message 4 of 5
(2,563 Views)

The solution to our problem was found using the oscilloscope. We found that the terminating resistors we were using were no sufficient so got some larger resistor and now the communication is working terrifically. Thanks for the advice and all the help.

 

Thomas

0 Kudos
Message 5 of 5
(2,542 Views)