01-17-2019 08:04 AM
Problem Summary:
The RT application is running in cRIO already but we need to publish all the measurements in application over MODBUS protocol. I created MODBUS mapping by using Labview DSC module.
In cRIO side, I did everything regarding tutorials and instructions but I cannot read the register 0001 at MODBUS Master at laptop side. I only suspicious about the adapters I used while converting RS 232 port - RS 458 – USB. You can find the schematic of convertings. If you have a feasible converter or adapter suggestion for my application or do you have any another solution please let me know, I will be so appreciated.
Hardware:
Software
Solved! Go to Solution.
01-18-2019 01:33 AM
Hi,
Suggested and build many of those connections. Normally most of the 232-485 converters and USB-232 will work.
These are the problems that can across my path in the last years:
232-485. Not all manufacturers believe that A=+ and B=- Also sometimes you have to swap A and B at one side.
485 is a balanced line and + goes to + and - to - But there are some that think differently.
Another thing is the 0V Connection and terminators. I think in your situation the connection is short. So it should work Ok without terminators. To be sure I would suggest to add the terminator resistors.
If the 232-485 converter and the 485 host have the same power source you leave out the 0V connection. If there is any galvanic isolation the power sources are not the same and a 0V connection maybe necessary.
232-USB: With the devices from FTDI I never had any problems.
ModBus: Is it possible to use the MB LoopBack command ?
You say address 0001. In DCS terms it is reading 40001. This is translated in ModBus function code 3 and address 0.
With DCS connection the address offset is always a problem.
Hope this helps.
Kees
01-21-2019 07:31 AM
Hi KC,
Thank you for the detailed explanation.
I am actually using Modbus library that comes with DCS module. ( Not IO Server) In this library, I tried to use Modbus RTU slave and master VIs. But I cannot find any functional example or any explanation about MODBUS RTU.
Loopback for Modbus and Serial is working for both PC and cRIO.
What I ask is adapter combinations that I should use. As you know I need to use a null modem and RS 232 to RS 485 converter combination. When I look at the pins of converters with a null modem, things are getting complicated.
During that time, I tried to use Modbus TCP/IP and it worked perfectly. But I am still worried if this Modbus TCP IP is not suitable for this project.
01-22-2019 01:17 AM
Which converters are you using ?
Why not use ModBus TCP ?
01-22-2019 07:51 AM - edited 01-22-2019 07:56 AM
I use Hexin RS 232 to RS 485 converter. You can find the datasheet here
But the combination is like that ;
(cRIO RS 232) > (RS 232 to RS 485 Converter) > (RS 232 Null modem cable) > (RS 232 to USB Converter) > (PC)
Also, I tried that one;
(cRIO RS 232) > (RS 232 Null modem cable)> (RS 232 to RS 485 Converter) > (RS 232 to USB Converter) > (PC)
I need to use RS RTU mode because I need to communicate with another industrial controller over Modbus RTU.
I added the schematic of my application;
Additionally, I added the trial application that contains Modbus RTU slave on RT, RTU Master on PC. This application is working like a charm with TCP/IP but I couldn't make it work for RTU.
Thank you for helping.
01-22-2019 09:14 AM
I saw these converters before. With the name Hexin and others.
The problem with these converters is the power. Are pin 4 and 7 connected to a RS-232 signal that is active + or - 5V or more ?
05-16-2019 03:29 AM
Hi,
Sorry responding late, I changed my cables and did these configuration:
(RS 232 Port of cRIO 9064) => (Null Modem Cable) => ( RS 232 TO USB Converter) => (USB Port of Laptop)
This configuration work great for me .
Thank you for help.