New Community Ranking System
Our Community ranking system has recently been updated. You may notice changes in user rankings and receive system messages or notifications. If you have questions about how the new ranking works, please refer to the announcement post for more details (click here).
M340 Modbus command to read input registers
Modicon PAC Forum
A forum for topics related to the scope of Modicon PAC offers and ecosystem along the whole lifecycle: Modicon M580 and 340, EcoStruxure Control Expert, EcoStruxure Process Expert (Unity Pro) and more.
Search in
Improve your search experience:
Exact phrase→Use quotes " "(e.g., "error 404")
Wildcard→Use * for partial words(e.g., build*, *tion)
AND / OR→Combine keywords(e.g., login AND error, login OR sign‑in)
Keep it short→Use 2–3 relevant words, not full sentences
Filters→Narrow results by section(Knowledge Base, Users, Products)
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send InviteCancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-06-2904:39 AM
M340 Modbus command to read input registers
Good evening,
I have a PLC P34 1000 and communicate with a flow converter through modbus rtu . but the data i need to read exist on input registers and the manual of converter telling that you have to use command 4 as known but when i'm using read_var the communication halt after a while and the data is not recognized because the data type sent is floating.
by the way i read the holding registers and everything is ok.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-06-3006:38 AM
The READ_VAR function should be able to read input registers as long as you define the obj type as %IW. The function code to read %IW is 4 .
You mention " the data is not recognized because the data type sent is floating.":
1: does this mean that the input data you read is a 32-bit floating point (real) data? In that case you should adjust the read length to 2 (registers= 32 bits).
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-06-3006:38 AM
The READ_VAR function should be able to read input registers as long as you define the obj type as %IW. The function code to read %IW is 4 .
You mention " the data is not recognized because the data type sent is floating.":
1: does this mean that the input data you read is a 32-bit floating point (real) data? In that case you should adjust the read length to 2 (registers= 32 bits).