[?]: s7-300 and control techniques via Modbus

SIMATIC S7-200/300/400, Step7, PCS7, CFC, SFC, PDM, PLCSIM,
SCL, Graph, SPS-VISU S5/S7, IBHsoftec, LOGO ...
aykut66
Posts: 2
Joined: Mon Jul 17, 2023 5:16 am

[?]: s7-300 and control techniques via Modbus

Post by aykut66 »

control techniques I want to control the driver with modbus.
need sample with delta plc or siemens s7300 plc
rdokt
Posts: 8
Joined: Mon May 04, 2009 8:04 pm
Location: America

Re: [?]: s7-300 and control techniques via Modbus

Post by rdokt »

Modbus in an S7-300 is possible. The easiest (but not cheapest) method is to use a CP340 or CP341, and buy the Modbus Slave dongle that plugs in to it. Then you configure the driver in Hardware Configuration to point to the DB where you write your data. There is a Modbus Master dongle, but it isn't worth the money.

If you don't have the money for a dongle, you'll need to really understand how a Modbus message is structured. This site has a decent explanation: https://www.csimn.com/CSI_pages/Modbus101.html
You'll build your message in a "transmit" DB, then use a P_SND_RK instruction to send the message to a slave device. Then use a P_RCV_RK instruction to retrieve the answer into a different DB.
For each type of data you want to retrieve, you'll have to send a different message (by swapping out what's contained in your transmit DB and re-sending).
You'll repeat the same process if you have multiple devices on an RS-485 multi-drop network, then start all over again.