Author Topic: Read function 03 and 04 register on same RS485  (Read 12256 times)

EtienneP

  • Newbie
  • Posts: 5
    • View Profile
    • HVAC Technician
Read function 03 and 04 register on same RS485
« on: March 11, 2015, 06:11:41 PM »
Hi,

I'll use an Nano10 to read and smal controler. I need to read in modbus RTU 9600 8,2,n with function 0x03 at adresse 10 the 23 first register. It's working!!!

Now in the same program I need to read on modbus the same module but with the function 0x04 6 bit.
Starting Adresse 0
Count 3.

Can I read with this 2 function on the same port?

Thank for Helping

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Read function 03 and 04 register on same RS485
« Reply #1 on: March 12, 2015, 10:00:53 AM »
Yes, you can use SETSYSTEM 6,4 to change the function that READMODBUS uses from 03 to 04.

If you want to use both functions, then each time before a READMODBUS command is called, you run a SETSYSTEM 6,n  to change the function to 03 (n==3)  or 04 (n==4)

See the following for more info about READMODBUS commands:

http://www.triplc.com/yabbse/index.php?board=2;action=display;threadid=298
Email: support@triplc.com
Tel: 1-877-TRI-PLCS