Host Engineering Forum

General Category => DirectSOFT => Topic started by: ChrisB on May 29, 2010, 10:44:04 AM

Title: HMI to plc problems
Post by: ChrisB on May 29, 2010, 10:44:04 AM
First let me say this is not a normal project... I am using it in my home in an attempt at certain home automation. I have an 8" AVG "EZ-Automation" HMI without built in PLC talking to a DL205 system with a 260 processor. I am having problems with "change screens". I have a prox at my front door that senses open close. When that sensor changes state it loads a 1 (k1) into out (word). Problem is it wont change to screen 1. I am using V2050 as my memory location and it is not being used anywhere else. I also went into the panel attributes screen of the hmi and set it to look at v2050 for all screen numbers that could possibly change. When i first set this system up i was using a discrete bit and turning the "welcome" screen on- and it was working fine. Problem was that If I manually changed the screen at the panel it would never return to the "welcome screen (screen 1) (k1). Anyone care to take a guess? I have set up a data view and put in v2050 -decimal-word. It does load a 1 in the data view! Screen just wont change! i will post up a phone number if anyone would like to call and help me point to point line by line troubleshooting. Thanks to everyone that can help!       Chris
Title: Re: HMI to plc problems
Post by: b_carlton on May 29, 2010, 02:54:21 PM
Set up the appropriate register for "Current Screen" and monitor that within the PLC. When the screen has changed to the 'requested' screen change the 'requested  screen' to a non-used screen number (not zero). The 'change screen' action only takes place when the 'requested screen' makes a change. Leaving on the previous requested screen makes it impossible to change again back to the 'requested screen' a second time. In other words, leave the 'requested screen' V location for most of the time on a non-used screen number (not zero). By the way, 'zero' is reserved for a 'change to previous screen' command.
Title: Re: HMI to plc problems
Post by: b_carlton on May 29, 2010, 03:03:41 PM
It seems that very few applications of PLCs are 'normal'. They are 'more or less interesting' 'Non-normal' = 'More Interesting'. You will be warned if the project is way out of line with PLC usage. Otherwise, experiment away. The folks here, at the AutomationDirect forum and at www.plctalk.net/qanda/ are eager (it's an 'ego stroke' kind of thing if you know what I mean) to give helpful information.
Title: Re: HMI to plc problems
Post by: ChrisB on May 29, 2010, 04:17:22 PM
Mr.Carlton as always appreciate your help. I really need your help with this one!!! I dont know how to post code.... Is there a way you can easily tell me so you can have a direct peek? One of my change screens is for tomorrow... my daughters b-day. I have 4 children and i am trying to do a screen for each of them. All i am doing is using a month/date = to Cxxx and then using Cxxx positive differential to LD, OUT V2050. I would really like this to come up on its own tomorrow. BUt in between if the front door is opened it should interrupt and load the welcome screen and when the door is closed load the b-day screen again. If there is an easy way to paste code please let me know.       Chris
Title: Re: HMI to plc problems
Post by: b_carlton on May 29, 2010, 04:36:43 PM
Check email.
Title: Re: HMI to plc problems
Post by: ChrisB on May 29, 2010, 04:41:53 PM
I am at home. I dont know if you sent to my work e-mail??  Chris
Title: Re: HMI to plc problems
Post by: b_carlton on May 29, 2010, 04:46:16 PM
Sorry - sent PM
Title: Re: HMI to plc problems
Post by: ChrisB on May 29, 2010, 04:51:17 PM
replied!! Dont really want to be bothersome in a personal call believe me i realize people have a life on the weekend especially. If it comes to it and you are willing and not busy i will take you up on it. Thanks again! Chris
Title: Re: HMI to plc problems
Post by: b_carlton on May 29, 2010, 05:23:03 PM
No problem, call if you wish.

But it seems you want the 'B-Day' screen to show all day (on the 'special day') UNLESS someone comes to the door. Keep a 'C' bit set that today is the B-Day.

So the priority of screens is:

'Welcome' screen.
Birthday screen - if appropriate by day.
Normal screen for the thing being done right now.

So - if not 'Doing Welcome' (door closes) then
if a B-Day and screen not on B-Day screen then request B-Day screen
else set to non-used screen number
Title: Re: HMI to plc problems
Post by: ChrisB on May 29, 2010, 05:26:31 PM
Yes,   BUT here is the kicker.... If i go in and manually operate the touchscreen it will change screens like it should, but, but, but it will never return to the "welcome screen" nor the b-day screen. I spoke with AD about this and they said it would take some elaborate code to make it do that. something about using a timer to a blank screen or something like that. I posted code in another thread.       Chris
Title: Re: HMI to plc problems
Post by: Controls Guy on May 31, 2010, 11:33:37 PM
First let me say this is not a normal project... I am using it in my home in an attempt at certain home automation. I have an 8" AVG "EZ-Automation" HMI without built in PLC talking to a DL205 system with a 260 processor. I am having problems with "change screens". I have a prox at my front door that senses open close. When that sensor changes state it loads a 1 (k1) into out (word). Problem is it wont change to screen 1. I am using V2050 as my memory location and it is not being used anywhere else. I also went into the panel attributes screen of the hmi and set it to look at v2050 for all screen numbers that could possibly change. When i first set this system up i was using a discrete bit and turning the "welcome" screen on- and it was working fine. Problem was that If I manually changed the screen at the panel it would never return to the "welcome screen (screen 1) (k1). Anyone care to take a guess? I have set up a data view and put in v2050 -decimal-word. It does load a 1 in the data view! Screen just wont change! i will post up a phone number if anyone would like to call and help me point to point line by line troubleshooting. Thanks to everyone that can help!       Chris

Screen changing from a PLC register is tricky sometimes.  I think the MMI doesn't necessarily look at the register as often as is should.  I had a CTC Interact MMI one time where the screen selection control didn't seem to be working.  I checked the PLC code and was pretty sure there weren't any issues.  So the problem came down to that the MMI either wasn't reading the register from the PLC, or wasn't looking at it for screen display decisions often enough (or at all).  I put a numerical display element on some random screen based on the same register, and it would faithfully display the number of the screen I wanted, without changing to that number screen, so I knew that the tag was pointing to the right register and that the MMI had read the register since I set it.  For that MMI, "0" means "No request, leave the present screen displayed".

To get it to work I ended up modifying the PLC screen request logic.  I connected the register to the logic through a 50% duty flasher relay bit.  If there was an active request to display a certain screen, it would contain the desired screen integer 50% of the time, and the other half it would contain a 0.  Seems like the additional 0-to-value edges helped the MMI notice the request and it seemed to work OK after that.
Title: Re: HMI to plc problems
Post by: Controls Guy on June 02, 2010, 12:46:55 PM
Yes,   BUT here is the kicker.... If i go in and manually operate the touchscreen it will change screens like it should, but, but, but it will never return to the "welcome screen" nor the b-day screen. I spoke with AD about this and they said it would take some elaborate code to make it do that. something about using a timer to a blank screen or something like that. I posted code in another thread.       Chris
I usually do screen changes on a one-shot basis.  If an alarm occurs, for instance, that I want to annunciate, switch to the alarm screen (or to a splash screen annunciating that particular alarm, if it's critical), but if your logic forces that screen to stay, the operator's screen nav keys won't work.  If you want the program's selected screen to be more persistent, use the register that lets the PLC know what screen is currently on display.  Write some PLC logic that encodes your decision for when to return to the welcome screen (have been on another screen for more than five minutes, or check at the top of every hour, or whatever), and change it back.