Author Topic: T100MD888+ as ModBus slave  (Read 18755 times)

A.Slavchev

  • Newbie
  • *
  • Posts: 2
  • I'm a llama!
    • View Profile
T100MD888+ as ModBus slave
« on: March 31, 2009, 04:36:28 AM »
hi!
I use T100MD888+ and trying to make communication betwen this one and another PLC that has ModBus. When T100MD888+ is master in the network everything is OK, but when it is slave it doesn't work. Is there anyone that was made this before to help me. And is there anyone that can say me what is the adress of the holding registers that i can read?
Thank you in advance!

Julian

  • Newbie
  • *
  • Posts: 4
  • I'm a llama!
    • View Profile
Re:T100MD888+ as ModBus slave
« Reply #1 on: March 31, 2009, 04:45:50 AM »
Hi,
I've the same problem, I've connected the device with my PC, where I have a application that sends Modbus commands. The format that I send is as follows:
0103xxxx0001<CRC16> <CRC16>
01 - for slave number 1
03 - read holding registers
xxxx - the address of the register
0001 - read 1 register
I got an answer from the PLC, but it is always "0".
I have value in DM(x) register

Regards,
Julian Dimitrov

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:T100MD888+ as ModBus slave
« Reply #2 on: March 31, 2009, 12:31:12 PM »
hi!
I use T100MD888+ and trying to make communication betwen this one and another PLC that has ModBus. When T100MD888+ is master in the network everything is OK, but when it is slave it doesn't work. Is there anyone that was made this before to help me. And is there anyone that can say me what is the adress of the holding registers that i can read?
Thank you in advance!

The T100MD888+ can work as a MODBUS master or as a MODBUS slave. There should be no problem. As a MODBUS master your need to program the PLC to run command such as READMODBUS, WRITEMODBUS, READMB2 and WRITEMB2.

If T100MD888+ is used as slave then you MUST NOT execute any READMODBUS/WRITEMODBUS command since it will then interfere with command coming from another master. Normally the PLC does not need any program (a blank program inside the PLC is fine and in fact the best way to test), all you need to do is to ensure that the serial comm format (baud rate, data bit, stop bit and parity) are defined the same and the PLC will automatically send response to MODBUS RTU command it receive from another master.

Is your other PLC able to work as MODBUS master?  The best way to test is to use two T100MD+ PLC to talk to each other using MODBUS. Another way is to use a HMI or touch screen LCD panel to talk to the PLC.


« Last Edit: March 31, 2009, 12:31:38 PM by support »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:T100MD888+ as ModBus slave
« Reply #3 on: March 31, 2009, 12:34:45 PM »
Hi,
I've the same problem, I've connected the device with my PC, where I have a application that sends Modbus commands. The format that I send is as follows:
0103xxxx0001<CRC16> <CRC16>
01 - for slave number 1
03 - read holding registers
xxxx - the address of the register
0001 - read 1 register
I got an answer from the PLC, but it is always "0".
I have value in DM(x) register

Regards,
Julian Dimitrov

Did you read from the correct binary (0 offset) address? Please refer to Chapter 5 of the T100MD+ User Manual for the mapping of the DM
  • address to the MODBUS space. I believe DM[1] is mapped to holding register 41001, but the binary address is 1000 which is what you use to send to the PLC.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

Julian

  • Newbie
  • *
  • Posts: 4
  • I'm a llama!
    • View Profile
Re:T100MD888+ as ModBus slave
« Reply #4 on: April 01, 2009, 12:06:38 AM »
Hi,
Thank you for the rapid answer, it worked and everything is okay.
Best Regards,
Julian Dimitrov

A.Slavchev

  • Newbie
  • *
  • Posts: 2
  • I'm a llama!
    • View Profile
Re:T100MD888+ as ModBus slave
« Reply #5 on: April 01, 2009, 12:14:51 AM »
Hi!
Thank you for the help!I find my mistake and now the PLC working corect.
I have another question, is there anyone that is made some protection of DI/DO and AI/AO of the PLC?
Thank you in advance!

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:T100MD888+ as ModBus slave
« Reply #6 on: April 02, 2009, 08:41:22 AM »
What kind of protection do you need? Against what kind of threat? The PLC I/O can take moderate amount of over voltage (say 50% above rating) over a short period of time. But if you need for example 1000V isolation from the sensor, then you will need to add external optical isolation or use the EXP1616R to provide the I/O isolation.

As for analog input on the T100MD+, as long as you don't apply gross overvoltage to the analog input it can take momentary hit with up to 24V DC. Analog isolation would be much more costly to implement and we would recommend using the I-70xx analog input module (connect to the PLC via RS485) if that is desired.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

Julian

  • Newbie
  • *
  • Posts: 4
  • I'm a llama!
    • View Profile
Re:T100MD888+ as ModBus slave
« Reply #7 on: April 09, 2009, 04:00:06 AM »
Hi again,
I'd like to ask you something, is there a way to connect and measure temperature trough the analog inputs with PT100 type sensor, can you offer me some schemes of connections.

Thank you in advance,
Julian Dimitrov

philipjoseph

  • Jr. Member
  • Posts: 57
    • View Profile
Re:T100MD888+ as ModBus slave
« Reply #8 on: April 09, 2009, 10:58:56 AM »
You can check:
http://www.tri-plc.com/appnotes/AppnoteMain.htm
There is an excellent example using a 10K Thermister. You will need to use the values for the PT100 to crate the table.

Philip.
Philip.

Julian

  • Newbie
  • *
  • Posts: 4
  • I'm a llama!
    • View Profile
Re:T100MD888+ as ModBus slave
« Reply #9 on: April 09, 2009, 10:50:52 PM »
Thank you for your help, i think that will work for me.

Regards,
Julian

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:T100MD888+ as ModBus slave
« Reply #10 on: April 11, 2009, 12:57:01 PM »
PT100 generally are connected to some kind of signal conditioner which will convert the measured value into 0-5V for the PLC. PT100 resistance range is a bit low to use the same setup as the 10K thermistor since the measured voltage would be in the very low end of the analog scale. But if you decrease the voltage divider resistor value then the self heating for the PT100 can become a problem and affect accuracy.

Good thermistors today are very accurate and stable for measuring ambient air temperature. Unless  you want to measure extremely low or high temperature you will find using the thermistors much more cost effective a solution.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS