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: 2021-12-15 03:32 PM
Hi Folks,
I have couple programs running with communication from M172 to the TM172DCLWTH HMI, i can easily access the plc "status variables" from the HMI to show statuses on the screen.
Now the idea is to use the internal temperature sensor of that TM172 HMI, i know the variable in the display where the temperature value gets written into but i am not able to use that temperature variable in my PLC program.
I just cannot drag and drop the variable from the "HMI Vars and Parameters" window in my ST programming window.
When I type that variable in my program then I will get an error when I compile the program.
Is there a way to have access the HMI variables in the M172 controller and if yes how can I achieve that?
Thanks alot in advance.
Michael
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: 2021-12-27 07:31 AM
Hi,
I guess you are using the TM172 Display as modbus master of the M172 PLC.
If this is the case, I suggest you define a R/W Status Var on M172 PLC and write on it periodically from the PLC of the TM172 Display the value of the temperature sensor.
TM172 Display has target blocks which allows to write modbus messages from the Programming section.
BR,
Federico
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: 2021-12-27 02:53 PM
Hi @FedericoM ,
thank you for your respond.
yes the TM172 is connected via mod is master.
i cannot access target variables in the plc from the display. I can use the target variables in the display editor but that doesn’t work.
i need to somehow write the temp variable from the plc in to the plc.
can you make an example please what you mean?
Your help is very appreciated.
regards,
Michael
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: 2021-12-27 11:52 PM
Hi,
try to check the examples and powerpoints available at this link:
https://schneider-electric.box.com/s/fqho8wmbqyfk5n4ne103ydqmym1g4yw4
In the Fan Coil control example, in the Programming part of the TM172DCL project you can find a small program which writes some data from TM172DCL to M172.
At this link:
https://schneider-electric.box.com/s/76vujqoan6q4nof88ju8i0peue5jek3b
you can find a full project of TM172DCL used as thermostat, in this case TM172DCL is a modbus slave. It means you have to implement modbus master on M172 and read/write what you need from TM172DCL.
If you prefer a solution like this one (it allows to connect several M172DCL to a M172), check also the manual with the table of all the available modbus registers on the thermostat.
Regards,
Federico
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-01-02 11:23 PM
Hi,
How is you configuration? You use a TM172P as controller and a TM172DCL as HMI?
If yes is the HMI Modbus RTU server or client?
If the HMI is server you could find the temperature on Modbus register 8208
If the HMI is client you need to write the value manualy down to the TM172P via target block sysMbMRTU_FC6.
best regards
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-01-03 02:17 PM
Hallo @Bastian_Schmitz,
Yes i have have a TM172DCL connected to a TM172 via Modbus Master.
Can you make a example how I could read that Modbus register 8208?
I got thrown in the cold water and need to make it work. (Wurde ins kalte Wasser geschmissen)
Your help is very much appreciated.
Thank you.
Regards,
Michael
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-01-03 10:43 PM
Hello,
In that case you need to define on the TM172P a Status Variable which is set to read and write ability(Default) like explained from @FedericoM before.
After that you need to create a Programm which is aligned to the background task in the programming tab.
In this programm you need to use the Target block sysMbMRTU_FC6.
You could see here an example
The functionblock need as input the follow information
addr | Modbus RTU address of the slave controller (a.e. 1 ) |
base | Modbus register address were you want to send your data |
object | The value which you want to write |
polling time | Polling time in [ms] |
timeout | Timeout in [ms] |
waitBeforeSend | time in [ms]to wait before send |
You could find this information also in the FB description.
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-01-17 11:53 AM
Hello @Bastian_Schmitz and @FedericoM
thank you for your help, i made it work.
I had to create a poll timing routine else the HMI would have a to low response time and was nearly impossible to operate it.
Now I can read the HMI's internal Temperature and Humidity sensor.
Really appreciated all your help and thank you for being so supported, the world need more people like you.
Thanks.
Regards,
Michael
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.