{"id":249,"date":"2023-10-09T13:50:55","date_gmt":"2023-10-09T11:50:55","guid":{"rendered":"https:\/\/beta.ewattch-documentation.com\/?p=249"},"modified":"2023-10-09T13:50:55","modified_gmt":"2023-10-09T11:50:55","slug":"plc-configuration","status":"publish","type":"post","link":"https:\/\/ewattch-documentation.com\/?p=249","title":{"rendered":"PLC configuration"},"content":{"rendered":"<p>The PLC must write its data to the Tyness memory using a specific format and at a specific address in order for them to be uploaded to EwattchCloud.<\/p>\n<ul>\n<li>The data must be written starting at address 0 of the Tyness.<\/li>\n<li>The maximum number of 16-bits words which can be written to the Tyness is 20.<\/li>\n<li>The PLC must use Modbus command code 6 or 16 to write its data to the Tyness.<\/li>\n<li>The Format of the Modbus Table must conform to the description below.<\/li>\n<\/ul>\n<p><strong>Modbus table format<\/strong><\/p>\n<p>The Modbus table must be composed of a succession of data blocks. Each block contains a data descriptor and a succession of data of the same type (Example: 4 temperatures).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-9490 aligncenter\" src=\"http:\/\/192.168.48.3\/wp-content\/uploads\/2019\/12\/modbus-generic-table.png\" alt=\"\" width=\"247\" height=\"242\" \/><\/p>\n<p>The data descriptor indicates:<\/p>\n<ul>\n<li>data type and encoding of the data in the block.<\/li>\n<li>how many data are contained in the data block. A value of 0 means 1 data.<\/li>\n<li>the id number of the first data in the block. Id numbers allow to differentiate between values of the same type. Id 0 refer to the first data.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-9486 aligncenter\" src=\"http:\/\/192.168.48.3\/wp-content\/uploads\/2019\/12\/modbus-generic-data-descriptor.png\" alt=\"\" width=\"997\" height=\"94\" \/><\/p>\n<p>Here is the list of currently available data types:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-9533 aligncenter\" src=\"http:\/\/192.168.48.3\/wp-content\/uploads\/2019\/12\/modbus-generic-data-types-and-encoding.png\" alt=\"\" width=\"1317\" height=\"441\" \/><\/p>\n<p>\u00a0<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-9596 aligncenter\" src=\"http:\/\/192.168.48.3\/wp-content\/uploads\/2019\/12\/modbus-generic-available-machine-states.png\" alt=\"\" width=\"416\" height=\"129\" \/><\/p>\n<p>\u00a0<\/p>\n<p>Exemple of a modbus table uploading 4 temperatures, 1 energy, and 2 percentage to EwattchCloud. This table must be written at address 0 of the Tyness.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-9535 aligncenter\" src=\"http:\/\/192.168.48.3\/wp-content\/uploads\/2019\/12\/modbus-generic-data-block-exemple.png\" alt=\"\" width=\"902\" height=\"342\" \/><\/p>\n<p>\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The PLC must write its data to the Tyness memory using a specific format and at a specific address in order for them to be uploaded to EwattchCloud. The data must be written starting at address 0 of the Tyness. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-249","post","type-post","status-publish","format-standard","hentry","category-non-classifiee"],"_links":{"self":[{"href":"https:\/\/ewattch-documentation.com\/index.php?rest_route=\/wp\/v2\/posts\/249","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ewattch-documentation.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ewattch-documentation.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ewattch-documentation.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ewattch-documentation.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=249"}],"version-history":[{"count":0,"href":"https:\/\/ewattch-documentation.com\/index.php?rest_route=\/wp\/v2\/posts\/249\/revisions"}],"wp:attachment":[{"href":"https:\/\/ewattch-documentation.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=249"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ewattch-documentation.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=249"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ewattch-documentation.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}