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.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-06-29 04:39 AM
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.
thank you in advance
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-06-30 06: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).
2: What is not recognizing the data?
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-06-30 06: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).
2: What is not recognizing the data?
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.