LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RS232 Communication with Faulhaber Motion COntroller MC5010SRS using myRio1900

Hello,

 

I am trying to run a Faulhaber brushless motor (model: 3274G024BP4) using the motor driver (Faulhaber MC5010 S RS) from NI myRio-1900 controller. The Rx and Tx of the driver are connected to the Tx and Rx of the myRio. The UART communication is done using VISA resources.

 

I am utilizing the telegram structure protocol to communicate via RS232. This is mentioned in the RS232CommManual.pdf file (attached), page 15. The data in the telegram is to be sent as follows:

 

  1. First Byte:        SOF (start of the frame)
  2. Second Byte:   Data length 
  3. Third Byte:       Node number of the driver
  4. Fourth Byte:    Command code (page 16 in RS232commManual)
  5. Fifth Byte:        LB of Object Dictionary's Index number
  6. Sixth Byte:       HB of Object Dictionary'ss Index number
  7. Seventh Byte:  Subindex of the Object Dictionary
  8. Eighth byte:     CRC byte (checksum)
  9. Ninth byte:       EOF (end of the frame)

All these numbers are in hexadecimal.

 

Just to begin communication from myRio. I took the simplest problem of querying the device of its serial number. For this purpose, we need to access the 0x1018 index number (unsigned 16 bytes) and 0x04 subindex (unsigned 8 bytes) of the object dictionary. Therefore, in LabVIEW, the following was sent:

 

53 07 01 01 18 10 04 F4 45 (without the spaces)

 

The same task was performed in the Motion Manager software of Faulhaber. For this, the second pdf (Software manual) is referred. It is mentioned that the commands in this pdf will work only in the software and not other platforms (page 73). Therefore, to execute the same functionality, the protocol mentioned in page 78 was followed. It runs successfully in that software and we receive the answer (serial number) from the driver (pic attached). The following was sent in the software:

 

TRANSMIT 001 01 18 10 04 (using the Software Manual, page 78)

 

But when I run this query in LabVIEW myRio using nothing happens!!. A timeout error comes which indicates that the driver did not understand the protocol and thus no response came within the default timeout. I did three modification of the same LabVIEW codes (attached: comm_test_01.vi):

 

  • Each byte is sent one by one and after that, we read
  • Each byte is sent one by one and simultaneously read for acknowledgment and then the last read is put to see the serial number.
  • All bytes are sent at the same time and then we do read

None of the above three iterations showed any response and timeout error occurred. I also have a question whether we should acknowledge instantly as in iteration 1 and 2 or send the bytes as a whole and then acknowledge (iteration 3).

 

It is confusing that the same function of querying serial number works (although different protocol) on Faulhaber Motion Manager software but not in LabVIEW.

 

It would be great if you could point us in the right direction and point out the mistake in the communication protocol.

 

Thanks in advance!!!

 

 

0 Kudos
Message 1 of 2
(2,870 Views)

I found your post because I was having the same issue. This is a late reply, I hope you solved the problem in the meantime, but I might as well answer hoping to help others.


Did you check the logic levels? I spent a day to find out that Faulhaber RS232 communication is IDLE LOW, instead of idle high like the standard uC UART. Maybe it is a backward compatibility feature for D-Sub?. The only reference in the manual you attached (and other Faulh. manuals) is "High Level Control" in Fig. 2 and 3, but I didn't notice that.

 

Best regards!

0 Kudos
Message 2 of 2
(2,149 Views)