With the exception of the price of this cable, I am very pleased with its performance. So it is very easy to see when signal transmission is happening. The USB side of the cable has 2 LED's - a red for transmit and a green for receive. The GND on the cable is connected to the GND on the MTrim. The TXD-/TXD on the cable is connected to the RX-/RX on the MTrim and the RX-/RX on the cable is connected to the TX-/TX on the MTrim. The data sheet can be found here: USB-RS422-FTDI The finished code will differ slightly due to the fact that the communication on this port will be driven by the SLC 5/04 processor, but for testing purposes I have added code to read and write to parameters to show the concept.Īs mentioned in a previous post I am using a USB to RS422 cable( USB-RS422-WE-1800-BT USB-RS422-WE-1800-BT) to be able to communicate to the Fenner M-Trim controller. The code for this portion of the project can be found at in the Serial/MTrim folder. The Data format determines the decimal position for the data. The MSG Type determines whether it is a read or write packet. The protocol is a simple 12 byte ASCII string and uses ‘\x02’ as the STX (start of transmission) and ‘\x03’ as the ETX (end of transmission). The protocol can be found in the User Manual in chapter 7 ( ). I am communicating to a Fenner M-Trim motor controller over a RS-422 serial connection. If the import twisted statement runs with no errors, you have a working Twisted installation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |