Announcement

Collapse
No announcement yet.

Save screenshot to USB stick

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts


  • Save screenshot to USB stick

    Hello and good day,

    We've been using C-more Programming Software (Vers6.4.2) since now. Connected is a panel type EA9-TI5CL (XGA - 1024x768).

    We would like to solve the following task:
    Press a pushbutton to take a screenshot and save it as a file to a connected USB stick.
    Is there a simple solution for this? Thank you in advance.

    Yours sincerely
    Tom


  • #2
    Use the internal tags.
    One of the tags[SYS USB Ready To Use] can be a capture button visibility.
    Another tag [SYS USB WRITESTATUS] indicates if the HMI is writing to the USB stick. Use it for capture(write) complete.
    When capture(write) is complete, set the another tag [SYS USB Eject] . When that tag goes false, you can safely remove the usb stick.
    You can use a the eject tag as a message trigger to user that it is safe to remove.

    Years ago, I did this using the HMI event manager.

    [edit tagnames]
    Last edited by kewakl; 07-11-2019, 07:56 AM.

    Comment



    • #3

      Click image for larger version  Name:	SCRNSHOT.png Views:	0 Size:	6.8 KB ID:	123880
      The background message never shows at runtime. visibility is HMI tag SYS BIT ON == OFF

      The [Save Screenshot] button
      -- visibility == HMI tag SYS USB READYTOUSE == ON
      -- button == PLC tag GetScrnShot Momentary (however, I normally do not use momentary buttons!!)
      If I revisit this, I would change to SET and let PLC reset it

      The [Eject] button
      -- visibility == PLC tag OKTOEJECTUSB == ON
      -- button == HMI tag SYS USB EJECT Set ON

      The circle (writing indicator)
      -- visibility == HMI tag SYS USB READYTOUSE == ON

      Code:
      event manager
      Event USB_INSERTED  HMI TAG [SYS USB READYTOUSE]  ON STATE  ->  PLC TAG [USB_INSERTED] ON STATE
      Event USB_NOT_IN    HMI TAG [SYS USB READYTOUSE]  OFF STATE ->  PLC TAG [USB_INSERTED] OFF STATE
      Event USB_WRITING   HMI TAG [SYS USB WRITESTATUS] ON STATE  ->  PLC TAG [USB_WRITING]  ON STATE
      Event USB_INSERTED  HMI TAG [SYS USB WRITESTATUS] OFF STATE ->  PLC TAG [USB_WRITING]  OFF STATE
      PLC code is simple
      Code:
      .
      .     USB_INSERTED       USB_WRITING     GetScrnShot          OKTOEJECTUSB
      .----------] [----------------]/[-------------]/[-------------------(O)
      .
      Hope I translated it correctly!
      Last edited by kewakl; 07-11-2019, 08:34 AM.

      Comment

      Working...
      X