<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Program organization wrt HMI</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/39b796c9d0/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/39b796c9d0/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/39b796c9d0/</id><updated>2020-02-27T14:27:21.453000Z</updated><subtitle>Recent posts to Program organization wrt HMI</subtitle><entry><title>Program organization wrt HMI</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/39b796c9d0/?limit=25#7f1f" rel="alternate"/><published>2020-02-27T14:27:21.453000Z</published><updated>2020-02-27T14:27:21.453000Z</updated><author><name>krakers</name><uri>https://forge.codesys.com/u/krakers/</uri></author><id>https://forge.codesys.comcebb7a3c9f7f48855bffbe311240ae4a91d939aa</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thank you both for some really good points, I will for sure look into these tips. &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Program organization wrt HMI</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/39b796c9d0/?limit=25#95de" rel="alternate"/><published>2020-02-27T14:27:21.016000Z</published><updated>2020-02-27T14:27:21.016000Z</updated><author><name>josepmariarams</name><uri>https://forge.codesys.com/u/josepmariarams/</uri></author><id>https://forge.codesys.com13104cd8a43e4796c47f638c9cc07f0f7e55153a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;I am newbi in mvmv model, but I think that hmi in codesys allows it, you can compile your realtime (model model-view) without the visual part.&lt;/p&gt;
&lt;p&gt;For example, whe you associates a label text with an realtime variable is as a binding in C#, and you can pass an realtime fb via varinout to a visualization which could be like in wpf does with context property.&lt;/p&gt;
&lt;p&gt;The diference with wpf is that in wpf the binding variables are passed as text (which is converted in code after) and in codesys-hmi the binding variables are passed as code. It means that you cant compile your view part without your model-view part. But your has the advantage that it throws an error in compilation time.&lt;/p&gt;
&lt;p&gt;I think that you have the tools to do that. Another question is how you separate your model modelview from your model, if it has to be separated in a control.&lt;/p&gt;
&lt;p&gt;And, as Scott says, dont use control code in hmi part.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Program organization wrt HMI</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/39b796c9d0/?limit=25#cb8f" rel="alternate"/><published>2020-02-27T14:27:19.749000Z</published><updated>2020-02-27T14:27:19.749000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com6621cba40367290f1745a9d632683793ae70bd51</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; scott_cunningham&lt;/p&gt;
&lt;p&gt;I try to keep the "brains" in the program.  That means, avoid putting button logic, filtering, etc. in the HMI - doing this can cause troubles if you don't remember what all was done in the HMI and change your PLC code.  (I learned this the difficult way).&lt;/p&gt;
&lt;p&gt;I typically let HMI buttons set a variable True (like ReqStart) and then have the PLC logic set the variable to False - this is a sort of acknowledgement that the logic actually got the request.  Before I had tried impulse or timed settings on the HMI, but it would always lead to troubles - depending on the communication rate between the HMI and logic.&lt;/p&gt;
&lt;p&gt;Also, to support multiple languages, I define a status enumeration and send the code from the logic to HMI instead of a string - the HMI can then have lookup tables converting the code to language strings.  If it doesn't know the code - I simply have the HMI use, "Unknown status: " + code.&lt;/p&gt;
&lt;p&gt;I am sure others will have good ideas.&lt;/p&gt;
&lt;p&gt;Good luck!&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Program organization wrt HMI</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/39b796c9d0/?limit=25#6215" rel="alternate"/><published>2020-02-27T14:27:19.309000Z</published><updated>2020-02-27T14:27:19.309000Z</updated><author><name>krakers</name><uri>https://forge.codesys.com/u/krakers/</uri></author><id>https://forge.codesys.com608b2f08805a662657a02208c1edd74ebe4f88e9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Should HMI and program be decoupled like Model-View-Controller, or everything hard-coded? What is best for a flexible and maintainable system etc? Any suggestions?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>