Ports and Interfaces > Serial Ports

USB to RS-485 converter

(1/2) > >>

MrHobo021:
Hello, I am an Electrical Engineering and Computer Science student working with a biotech company on a project involving an RS-485 plc from a company called love controls (http://www.dwyer-inst.com/Product/Temperature/ProcessControllers/Series16A).  I am trying to take readings from a thermocouple and transfer them to my computer. I am working with the modbus RTU protocol and I am trying to do this in half-duplex mode. I purchased a USB to RS-485 converter from a company called Dtech (https://www.dtechelectronics.com/dtech-dt-5019-usb-to-rs485-422-cable_p118.html#Inquiry-go) I cannot tell if I am interfacing with this correctly. My computer (macbook pro) is able to recognize it as a serial port in terminal. I am using a software called CoolTerm to test the connection to see if I am actually connected. The "active" light on the USB to RS-485 is red and the "txd" light in the USB-to-RS-485 will briefly for a split second turn green when I try to interface in CoolTerm but no data will show up whatsoever.

I have very limited experience with embedded systems so any insight will be of great value. I have included a picture of the development environment on my computer and the USB to RS-485 converter.

Jan Axelson:
Does your converter's documentation provide advice on how to use it to send and receive data?

What is the output of the thermocouple and how is it interfaced to the converter?

MrHobo021:
The thermocouple is a type "K" thermocouple and the output is shown on the face of the RS-485. The output of the Thermocouple is accurate and does not need calibration. My only issue is getting output data to my computer. The directions on the converter talk about wiring and installing drivers if the computer needs the drivers to be installed but I don't see anything talking about interface.

I have attached a picture of the wiring of the back of the microcontroller. The yellow and red wires are the thermocouple (working fine), The fuzzy wiring on the bottom is the power source (also working fine), the remaining three wires are the data communications that link up to the USB-to-RS-485. I do NOT think this is a wiring issue per say but it doesn't hurt to include this information.

Please let me know if anything is unclear or if more info is needed.

Jan Axelson:
The thermocouple's output must be asynchronous serial data.

The handshaking protocols of the thermocouple and converter must match.

If the converter supports 2-way communications over 2 wires, the thermocouple and converter must agree on how to determine when the thermocouple can transmit.

The documentation for your components should discuss these things.

MrHobo021:
I would like to make a correction from what I stated earlier. This is NOT a PLC. It is a regular micro-controller. The data from the Thermocouple is displayed on the screen of the micro-controller and it is read from a register using the Modbus RTU protocol. The thermocouple functions separately and just feeds data to the micro-controller. I have a data-sheet that contains all the Modbus RTU operations for the micro-controller. It specifies that reading temperature is at Register 2 and the function number is 03. A Modbus message is structured XX-XX-XXXX-XX (I am using decimal units to keep it simple). I know for read temperature I have XX-03-0002-XX because I know I am doing a read command at register 2. The first and last parts deal with quantity and station number. I have attached the pdf containing the commands. The command I am trying to do is on page 1 and is the first command with the parameter "Process Value". What is the total value for this command if I am even asking this question correctly?

Navigation

[0] Message Index

[#] Next page

Go to full version