News:

  • June 26, 2026, 09:19:40 PM

Login with username, password and session length

Author Topic: Capturing a "snapshot" of a PLC program  (Read 17070 times)

russher

  • Jr. Member
  • **
  • Posts: 17
Capturing a "snapshot" of a PLC program
« on: October 03, 2014, 08:28:13 AM »
Is there a way in Do-More Designer to capture a "snapshot" of a PLC program - complete with element status and all the current values of memory registers? We have a number of Do-Mores deployed around the countryside, and I am thinking along the lines of a technician on-site being able to capture a current program status, email me the file(s) so that I can look at the program off-line later for troubleshooting purposes. Being able to see a static version of the current program status would be an important thing for us to be able to do.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: Capturing a "snapshot" of a PLC program
« Reply #1 on: October 03, 2014, 08:50:53 AM »
No, but that sounds like it could become a very useful feature.

I think you are wanting a snapshot of the Image Register associated with a specific PLC/Project.  Then be able to take that Image Register and load it "offline", and be able to use Ladder Status and Data View to monitor the "static" data (Trend View would show just a flat line at the snapshot-ed values, but even that might be useful).

Currently, there is a way to capture data in a .CSV file, then re-load it into a PLC (the same PLC or a different PLC).  This feature was added in Rel 1.3.  To create the .CSV, when connected online to the sourcing PLC, do File->Export->Memory Data.  You select what range of elements you want to export (e.g. V0 thru V4095, C0 thru C2047, etc.).  Once you generate the list of ranges you want, hit the Export! button at the bottom.  Now you have the data in a .CSV file.

You can now take that .CSV and "Import" it into a different Do-more PLC with the same project.  Once you connect to the other PLC with the same project as the source PLC, do File->Import->Memory Data..., select the .CSV file in the Open File dialog, then hit the Write to PLC button on the Import Memory Data dialog.  Now you have a pseudo snapshot of that data in your local PLC.  It won't have everything, but it will be somewhat close to the source PLC.

russher

  • Jr. Member
  • **
  • Posts: 17
Re: Capturing a "snapshot" of a PLC program
« Reply #2 on: October 03, 2014, 09:53:07 AM »
Thank you, franji1, for your reply. I have used other PLC's that have this feature - and it is a great tool for troubleshooting - especially when you can't impede the process. You take a snapshot for future perusal, then allow the current process to continue. Perhaps Do-More will consider this in a future release.
Thanks for the info of capturing data to a .CSV file. That may be good in some instances, but I can only imagine that once the captured data is written to the proxy PLC, all elements will update as per the PLC current status (IN's and OUT's, etc) and the original status - and intent - is lost.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: Capturing a "snapshot" of a PLC program
« Reply #3 on: October 03, 2014, 09:59:39 AM »
Thanks for the info of capturing data to a .CSV file. That may be good in some instances, but I can only imagine that once the captured data is written to the proxy PLC, all elements will update as per the PLC current status (IN's and OUT's, etc) and the original status - and intent - is lost.
You are correct.  It would be possible to download to a PLC with NO I/O, and keeping that PLC in PROGRAM mode, then you would have your I/O and other state maintained.

russher

  • Jr. Member
  • **
  • Posts: 17
Re: Capturing a "snapshot" of a PLC program
« Reply #4 on: October 03, 2014, 10:11:37 AM »
Ok - this may have potential. Could I download to a PLC containing only a CPU, have the PLC in Program mode, then peruse the captured status and values?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: Capturing a "snapshot" of a PLC program
« Reply #5 on: October 03, 2014, 10:39:23 AM »
Ok - this may have potential. Could I download to a PLC containing only a CPU, have the PLC in Program mode, then peruse the captured status and values?
I just tried it.  Make sure you download the PROJECT first.  Make sure the PLC is in PROGRAM mode.  Then do the File->Import->Memory Data...

I turned Ladder Status ON, and my X and Y contact states showed up based on the exported data.

Note that the Memory Data import/export mechanism only works on data-blocks, not heap-items, so you can't get $Main stage bits' status :-\

Mike Nash

  • Hero Member
  • *****
  • Posts: 652
Re: Capturing a "snapshot" of a PLC program
« Reply #6 on: October 03, 2014, 10:42:54 AM »
Would this work with the simulator with the inputs enable turned off?

Along the simulator lines, is there a way to have more than one simulator (not at the same time.) I was going to try this, but discovered the simulator is still loaded with the project I last tested with it. It looks like you have to manually clear the memory and all that.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: Capturing a "snapshot" of a PLC program
« Reply #7 on: October 03, 2014, 11:37:01 AM »
Would this work with the simulator with the inputs enable turned off?
No, because the I/O modules always exist in the simulator, so the X buttons and WX sliders would overwrite the values written to the PLC.

Quote
Along the simulator lines, is there a way to have more than one simulator (not at the same time.) I was going to try this, but discovered the simulator is still loaded with the project I last tested with it. It looks like you have to manually clear the memory and all that.
No.  If you have Windows 7, it supports virtual XP, so you could utilize that mechanism and have any number of Simulators running at the same time on one Windows 7 PC.

Here's a Microsoft article on how to do this
http://windows.microsoft.com/en-us/windows7/install-and-use-windows-xp-mode-in-windows-7

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: Capturing a "snapshot" of a PLC program
« Reply #8 on: October 03, 2014, 11:42:11 AM »
Quote
Along the simulator lines, is there a way to have more than one simulator (not at the same time.) I was going to try this, but discovered the simulator is still loaded with the project I last tested with it. It looks like you have to manually clear the memory and all that.
Sorry, I mis-spoke.  Yes you can have multiple versions, just not at the same time.

In the Designer installation BIN folder, copy your DmSim.DAT, DmSim.FLASH, and DmSim.STATE files to the names associated various projects you want (e.g. DmSimMyProj1.* or DmSimMyOtherProj.*).  Then, to utilize a specific "PLC", before you launch the Simulator, just copy the specific copies of the 3 files back on top of existing DmSim.DAT DmSim.FLASH, and DmSim.STATE files.

Mike Nash

  • Hero Member
  • *****
  • Posts: 652
Re: Capturing a "snapshot" of a PLC program
« Reply #9 on: October 03, 2014, 12:54:46 PM »
Would this work with the simulator with the inputs enable turned off?
No, because the I/O modules always exist in the simulator, so the X buttons and WX sliders would overwrite the values written to the PLC.

Well... except I just tried this very thing and it did work!

In the Do-more Simulator, "Sim" menu, uncheck "Enable Inputs" and I am able to change the values for X0 and WX0 in a data view and they take and stay "took" even in run mode. Re-checking it does overwrite the values.

I did not try to do the File->Import->Memory Data so I don't know if that would work or not.

Thanks for the other info RE Simulator files and WinXP under Win7 also!

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6164
  • Yes Pinky, Do-more will control the world!
Re: Capturing a "snapshot" of a PLC program
« Reply #10 on: October 03, 2014, 01:19:28 PM »
I think we added the disable inputs feature so that the automated test suite could be used on the Sim. While disabled, it should behave like a CPU with no modules.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO