adccommunitymod (AutomationDirect) asked a question.

changing screens on hmi with plc

Created Date: May 02,2008

Created By: Carrie

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

I was wondering if I could get some advice, I am first time user and I cannot seem to figure this out. I have a pushbutton on my touchscreen that loads a preset into my counter memories (see rung 6) which works fine, I would also like it to switch screens when pressed. The logic I have below (see rung 5) made it switch screens once but won't work anymore after that. I have tried 20 different variations but I can't find anything that will repeat after the first time pushed. Also I have about 35 different pushbuttons which I made a separate rung for each one to load the presets into the counters, is there an easier way to do this, like have it pull from a spreadsheet or something? // Rung 5 // Address 16 STR C104 LD K6 OUT V1400 LD K5 OUT V1401 LD K200 OUT V1400 // Rung 6 // Address 23 STR C104 LD K69 OUT V2000 LD K0 OUT CTA0 LD K0 OUT CTA1 Any help is greatly appreciated. Thanks Carrie


  • adccommunitymod (AutomationDirect)

    Created Date: May 03,2008

    Created by: bcarlton

    Though you didn't specify the HMI most work when a CHANGE happens to the screen register. Make sure that a register is set up where the HMI indicates its current screen number. Then place a rung which which compares the requested screen with the current screen. When they are the same then change the requested screen register to the manufacturer suggested value. This is usually a number which doesn't correspond to any screen.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: May 03,2008

    Created by: Carrie

    I set up an = statement and that worked, thanks I really appreciate your help.

  • adccommunitymod (AutomationDirect)

    Created Date: May 04,2008

    Created by: a agnone

    bcarlton why the random number? In his example I would load lets say K2 into V1401 (request). Then when K2 came back to V1400 (actually screen displayed) I would jump to or do something else. Why the random number? I dont see why he is loading a Kx in V1400, that is the v-memory the HMI is sending back with the screen value. Don't you load Kx into V1401 and watch it come back on V1400?

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: May 04,2008

    Created by: bcarlton

    I can't figure out what he was doing in his first code post even after the explanation. I don't know why you would send a number to the reported screen number location. Presumably a code post would be more understandable now that it works.

    I didn't use the term 'random number ', he did. I mentioned that some (he hadn't revealed that it was a C-More at that point) work if, after the returned screen number was the same as the requested screen, a number should be entered which wasn't the same as any exiting screen (which I presume he interpreted as 'any old number ' or 'random number '). Though I have worked with one that required that such a method required that you enter zero. A non-existing screen number triggered an error.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: May 04,2008

    Created by: Carrie

    Here is the updated logic that works now. What I want the button to do on my touchscreen is load the preset number into my two counters, reset the accumulated counters to 0, and then change to the screen that i have my counters displayed on. For some reason if you load a screen number once you can't do it again so right after you change screens you need to load a "random # " (a screen number that is not being used) so that the next time a button wants to switch to screen 5 the 5 won't already be in the memory address. Here is a link from the sites help page that told me about it, I just couldn't figure out how to make it work. I am not sure this is the best way to do it but after 20 different attempts it is the way that finally worked. Here is the link and the logic, oh yeah, and I'm not a he.

    http://support.automationdirect.com/faq/showfaq.phtml?id=866

    // Rung 7

    // Address 27

    STR C105

    LD K66

    OUT V2000

    LD K0

    OUT CTA0

    LD K0

    OUT CTA1

    OUT V1400

    LD K5

    OUT V1401

    // Rung 46

    // Address 290

    STRE V1400 V1401

    LD K200

    OUT V1400

    LD K201

    OUT V1401

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: May 04,2008

    Created by: bcarlton

    1. Sorry about the 'he '

    2. There is no need to overwrite the location where the HMI reports its current screen (V1400 in your code).

  • adccommunitymod (AutomationDirect)

    Created Date: May 02,2008

    Created by: Carrie

    I was wondering if I could get some advice, I am first time user and I cannot seem to figure this out. I have a pushbutton on my touchscreen that loads a preset into my counter memories (see rung 6) which works fine, I would also like it to switch screens when pressed. The logic I have below (see rung 5) made it switch screens once but won't work anymore after that. I have tried 20 different variations but I can't find anything that will repeat after the first time pushed. Also I have about 35 different pushbuttons which I made a separate rung for each one to load the presets into the counters, is there an easier way to do this, like have it pull from a spreadsheet or something?

    // Rung 5

    // Address 16

    STR C104

    LD K6

    OUT V1400

    LD K5

    OUT V1401

    LD K200

    OUT V1400

    // Rung 6

    // Address 23

    STR C104

    LD K69

    OUT V2000

    LD K0

    OUT CTA0

    LD K0

    OUT CTA1

    Any help is greatly appreciated.

    Thanks

    Carrie

    Expand Post