Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: Controls Guy on June 29, 2020, 03:38:58 PM

Title: Autostarting a password-protected project
Post by: Controls Guy on June 29, 2020, 03:38:58 PM
I have PC's at remote sites acting as a remote access router to the Do-More and also have a local copy of DMD running with trends configured.

Occasionally, through the kindness of Microsoft or the site management the PC gets power-cycled.   I have a non-admin user logging in automagically, and I can run the PLC project by putting a shortcut to the DMD file in shell:startup (kudos on the file association working better now), but since the project is password-protected, as soon as DMD goes online, it wants a password.

I can certainly understand not defaulting to providing the PLC password from the command line, especially since it would probably have to be stored in cleartext, but I'm not sure what I can do in this scenario.  DMD will allow logging on as the default user with no password, but it still needs a blank entry at the password dialog.  I can probably configure the default user with adequate permissions for my needs, or can create a new non-default, non-God user, but I don't know if I can get past the password entry dialog itself.
Title: Re: Autostarting a password-protected project
Post by: Controls Guy on June 29, 2020, 03:44:24 PM
A feature request related to this issue would be the ability to continuously log trends to disk-archive and then resume the same trend instead of having to have them be separate if DMD is shut down or the trend is stopped.
Title: Re: Autostarting a password-protected project
Post by: Controls Guy on July 03, 2020, 01:39:09 PM
Anyone have any ideas about this?   Is there a way to avoid the password dialog for unattended logons?
Title: Re: Autostarting a password-protected project
Post by: BobO on July 03, 2020, 01:42:33 PM
Anyone have any ideas about this?   Is there a way to avoid the password dialog for unattended logons?

Not that I'm aware of.
Title: Re: Autostarting a password-protected project
Post by: Controls Guy on July 03, 2020, 01:47:04 PM
Hmmm.   If I can get the default user (no PW required) configured with adequate permissions, then maybe I could start DMD from script and have the script type an <enter> some number of seconds after starting DMD.   How ever long it takes for the dialog to appear.

I guess that would amount to a feature request:   Have a command line switch that will skip the password dialog and log in as default.
Title: Re: Autostarting a password-protected project
Post by: RBPLC on July 03, 2020, 04:18:13 PM
If DMD is open, how long will trended data be saved? That is to say, if I start a trend at time zero, how many hours will the trend feature log data so that it can be downloaded for later use? Does this depend on the number of tags being trended and the number of trend views open?
Title: Re: Autostarting a password-protected project
Post by: Controls Guy on July 03, 2020, 05:30:53 PM
If DMD is open, how long will trended data be saved? That is to say, if I start a trend at time zero, how many hours will the trend feature log data so that it can be downloaded for later use? Does this depend on the number of tags being trended and the number of trend views open?

Not really.   Each point trended has a MB storage setting (and the default is configurable as well).   In my case, I'm not looking for true historical data, but rather the ability to look at recent operating data, and to have data already logged if the customer calls with an issue.  I can look back a few minutes, a few hours or a day or two to help troubleshoot, but not if DMD wasn't running during the time period in question.

I could log to the SD card, but some locations are H2-DM's, plus it's a lot more awkward than having the data already in the PC.   I could also use a SCADA package, since the DM's are configured as Modbus/TCP servers.
Title: Re: Autostarting a password-protected project
Post by: RBPLC on July 03, 2020, 06:42:13 PM
So storage is based on the MB set by the user? Where is this in the manual (topic number)? I was reading through the trend view information in the help files and apparently missed the memory allocation settings discussion.
Title: Re: Autostarting a password-protected project
Post by: franji1 on July 04, 2020, 07:03:00 PM
I split the discussion on Trend View Archiving to a new topic thread:
https://forum.hosteng.com/index.php?topic=3050.0
Title: Re: Autostarting a password-protected project
Post by: jcottrill on July 06, 2020, 05:25:21 PM
Hmmm.   If I can get the default user (no PW required) configured with adequate permissions, then maybe I could start DMD from script and have the script type an <enter> some number of seconds after starting DMD.   How ever long it takes for the dialog to appear.

I guess that would amount to a feature request:   Have a command line switch that will skip the password dialog and log in as default.

Hey Controls Guy,

Maybe have a look at Autoit (https://www.autoitscript.com/site/) if you are not already familiar.  It has the ability to automate Windows apps via scripting.  Might be a more robust way of sending the ENTER key as you can instruct it to wait for particular windows to appear.  Much of this depends on how the app was developed but most newer apps play well'ish in this environment.
Title: Re: Autostarting a password-protected project
Post by: Controls Guy on July 06, 2020, 05:54:06 PM
Thanks, @jcottrill!

I was thinking Windows scripting or even WinBatch (I'm very old), but I have heard of AutoIt, and will give it a good look.
Title: Re: Autostarting a password-protected project
Post by: jcottrill on July 07, 2020, 11:35:19 AM
WinBatch looks similar to AutoIt.  If you've already paid for the WinBatch licensing it should be a solid solution.  One advantage to AutoIt is that it is free.
Title: Re: Autostarting a password-protected project
Post by: Controls Guy on July 07, 2020, 01:25:02 PM
Actually, free is good if I need to roll it out to multiple remote sites.
Title: Re: Autostarting a password-protected project
Post by: Controls Guy on July 07, 2020, 06:10:38 PM
Followup:   Tried AutoIt and it works perfect.  Compiled the script to an EXE, copied that to the remote machine, didn't even install AutoIt locally, put a shortcut to the EXE in shell:startup and everything is happy!

Thanks again, @jcottrill!
Title: Re: Autostarting a password-protected project
Post by: jcottrill on July 09, 2020, 03:10:03 PM
No problem.  AutoIt has saved my bacon a couple times and allowed for integrating multiple systems that weren't meant to work together.