This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Two ports RS-485
#1
Hello. 
A few questions about the modbus
1. Is it possible to use both ports of a modbus with the profiles?
2. Is it possible to use the first RS-485 port simultaneously using the profile and the second using the script?
How to open second port? In help :
-- 19200 baud rate, even parity, 8 data bits, 1 stop bit, half duplex
mb:open('/dev/RS485', 19200, 'E', 8, 1, 'H')
3. Can I access the same device using a profile and a script in Modbus TCP or RTU. For example, poll once every 10 seconds by profile and run the script immediately.
If any option please give an explanation how.
Reply
#2
1. Yes, but not with the current firmware. We plan to release a test version next month

2. Yes, but you have to be careful with scripts. Accessing one port from several scripts at the same time will lead to random errors. For devices with several RS-485 ports naming is /dev/RS485-1 and /dev/RS485-2

3. TCP is fine, for RTU you must use ModBus proxy: https://forum.logicmachine.net/showthrea...53#pid1953
Function names are the same as when using modbus library directly, but it this case ModBus mapper takes care of queuing access to RTU port.
Reply
#3
Hello Admin,

We soon will be working on a project where we have to read out multiple energy meters over modbus rtu and visualize some values in the LM. This is about multiple sites.
The installer was proposed to use some rtu to tcp converters and then to use one LM to get all data.
Now we want to propose the use of multiple LMs to directly poll the data from the modbus rtu bus. Therefore I have some questions before we proceed with the solutuion.

- Can both RS485 ports be enabled and used at the same time? (normally yes but wanted to verify)
- Can we connect up to 32 devices on one RTU bus line?
- What is the maximum allowed length of one bus line so that there are no failures in reading. The installer is using CAT6a UTP with shield for exterior use.
  We know in some cases (in this project) the lenght is around 200m.
- Is there CPU limitation in getting the data if lets say we have the maximum allowed amount of devices on each bus line.
  The polling will not be very fast or what would be best to set for energy values (15min) and real time values like U,I,Cosφ...

Thank you in advnace for your reply.
Reply
#4
Yes you can use both, some LM have 3 and all 3 can be used.
Modbus standard allows 31 slaves on one line
200m is OK
If you are not going to pool it fast then it should be fine, make sure you use delta to write on change. Use virtula objects when possible or not write to the bus when not needed.
------------------------------
Ctrl+F5
Reply
#5
Hello Daniel,



Thank you for the quick response.

Yes this will be just in LM all done via virtual objects. No need to send any data over the KNX TP.

So if I understand correctly all the following ports can be used for modbus rtu communication.

   

I have read that 700m in general is the max lenght for a modbus line including the brunches (could be extended with repeaters but its not the point).
But this can change according to the interface hardware (LM), cable type, baud rate...
Would 500m lenght be still ok for LM to handle if baud is set to 9600?

Thank you again for the great support and effort.
Reply
#6
Yes both RS485 ports can be used for modbus. You should be fine if correct cable and wiring is done.
------------------------------
Ctrl+F5
Reply
#7
Ideally a bus topology should be used. 120 Ohm termination resistors at both ends are required for long lines. If there are branches/stubs, then they must be kept as short as possible. Or use a repeater for long branches, this way you can connect more than 31 devices per line.
Reply
#8
(05.10.2022, 12:12)Daniel Wrote: Yes both RS485 ports can be used for modbus. You should be fine if correct cable and wiring is done.

Yes I understand that but can also /dev/RS232 be used as a third modbus rtu interface?
Reply
#9
No
------------------------------
Ctrl+F5
Reply
#10
This LM model has 3x RS485: https://openrb.com/logicmachine5-power-dr/
Reply
#11
(05.10.2022, 12:15)admin Wrote: Ideally a bus topology should be used. 120 Ohm termination resistors at both ends are required for long lines. If there are branches/stubs, then they must be kept as short as possible. Or use a repeater for long branches, this way you can connect more than 31 devices per line.

Thank you admin for clarification. I knew about the 120 Ohm in the end of the line but I thought on LM side that the resistor was onboard.

So as you suggest we will have to add two resistors then between A-B , one on the LM port and one in the end of the line.

(05.10.2022, 12:24)admin Wrote: This LM model has 3x RS485: https://openrb.com/logicmachine5-power-dr/

OK I see now.

Thank you both for the great and quick support Smile.
Reply


Forum Jump: