Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: timk on May 05, 2014, 06:38:44 AM

Title: Do-more and Ethernet
Post by: timk on May 05, 2014, 06:38:44 AM
I am looking for a tutorial that shows how to setup the Do-More to send data to a file on a PC connected to the network. I have 20+ machines that I would like to transmit data to a pc file every time the machine cycles. Need to know how if possible to set this up.

Thanks
Title: Re: Do-more and Ethernet
Post by: BobO on May 05, 2014, 10:20:06 AM
Super easy. Take a look at DMLogger. As of the most recent release (1.3) you can instruct DMLogger.exe to output messages to a file.

In code you will be sending a STREAMOUT to the @DMLogger device. The message uses a specific format to notify DMLogger.exe to write the entry to a file, but that is all covered in the help system.
Title: Re: Do-more and Ethernet
Post by: timk on May 06, 2014, 05:09:13 AM
Looking at it now, thanks
Title: Re: Do-more and Ethernet
Post by: mhw on June 16, 2014, 11:24:46 AM
I have copied the example that is shown in the help file for "logging message data to a file". The message will show in Do-more Logger but not in the destination file. There are no errors. I am using the SIM and DMD 1.3.1. Do I need to DmLogger.exe on my PC? If yes then where do I find it?
Title: Re: Do-more and Ethernet
Post by: franji1 on June 16, 2014, 11:37:34 AM
Are you using @UserLog or @DmLogger as the STREAMOUT device?  The former is a log in the PLC, the latter broadcasts the log out the Ethernet port to be heard by any PC on the network that is currently running DmLogger.exe.

The ability to log messages to a data file are done by DmLogger.exe on your PC, so make sure you are using the @DmLogger as the device in STREAMOUT.  Also, DmLogger.exe must be version 1.3 (1.2 did not have this feature).

To run DmLogger.exe on your PC, you can run it via any of the following ways:
1. within Designer's LaunchPad view's Application group - look for "Do-more Logger" (it should be 3rd one on the left).
2. in Designer, Under the Debug menu (Debug->Do-more Logger)
3. Under Window's Start menu (Start->All Programs->Do-more->Designer 1.3->Do-more Logger 1.3
Title: Re: Do-more and Ethernet
Post by: mhw on June 16, 2014, 11:53:30 AM
Quote
Are you using @UserLog or @DmLogger as the STREAMOUT device?
@DmLogger
Quote
DmLogger.exe must be version 1.3 (1.2 did not have this feature).
This must be my problem. 1.2 opens regardless of where I launch it from.
What should I do?

Title: Re: Do-more and Ethernet
Post by: franji1 on June 16, 2014, 12:02:30 PM
I'm hoping that you are actually running 1.3.

It appears that the Logger's About box still shows 1.2 (not 1.3)  :-[.  Look at the options in the top margin, and look for "Recognize # command strings".  That is the option that was added for 1.3.  See the attached screen shot.

Title: Re: Do-more and Ethernet
Post by: mhw on June 16, 2014, 12:19:21 PM
Quote
look for "Recognize # command strings
Yes it is there.
The help file says that DmLogger will log an error if the path is not valid. I put in an invalid path and it does not show an error. (Not that I care) I just want it to log my files. Any ideas?
Title: Re: Do-more and Ethernet
Post by: plcnut on June 16, 2014, 01:14:25 PM
Could you post a screenshot of DMLogger with the command string visible?
Also, What version of windows are you running, and do you have Administrator privileges?
Title: Re: Do-more and Ethernet
Post by: mhw on June 16, 2014, 01:23:47 PM
Quote
Could you post a screenshot of DMLogger with the command string visible?
Attached
Quote
What version of windows are you running
Win 7 Professional
Quote
Administrator privileges?
Yes
Title: Re: Do-more and Ethernet
Post by: plcnut on June 16, 2014, 02:14:23 PM
You may need to right-click DMLogger and "Run as Administrator", because Windows 7 does not like giving access to the root drive. Your other option may be to use a file path that is within your User account area.
Title: Re: Do-more and Ethernet
Post by: mhw on June 16, 2014, 02:56:52 PM
Quote
may need to right-click DMLogger and "Run as Administrator",
No joy.
Quote
Your other option may be to use a file path that is within your User account area
I previously did have a file in my user account area. The screen shot that I posted was a random attempt to either make it work or throw a fault.
Title: Re: Do-more and Ethernet
Post by: plcnut on June 16, 2014, 03:10:06 PM
This stuff can go pretty deep...
Right-click your C: drive and go to Properties>>Security, and then check that SYSTEM, and Administrators both have 'Full Control'. You can click 'Edit' to go to the page to change them. Windows 7 had an update a few months ago that went through and changed the permissions on the OS drive, and made a mess out of one of our servers here. We were no longer able to write to anything on the C: drive that was not concidered "User" area. If that update is on your computer, then it may have changed that permission, and after you re-start your computer it may even change the permissions back. I do not remember the update number, but I may be able to find it if this is an issue for you.
Title: Re: Do-more and Ethernet
Post by: mhw on June 16, 2014, 03:25:30 PM
The only one that does not have a check to allow is the special permissions.
Title: Re: Do-more and Ethernet
Post by: plcnut on June 16, 2014, 03:30:09 PM
Sorry, but I'm at a loss...
Maybe try a capitol 'C' for the drive letter ???
Title: Re: Do-more and Ethernet
Post by: plcnut on June 17, 2014, 07:47:47 AM
One more thing to check:
Right-click C: then Properties>>Security>>Advanced>>Owner then make sure that The owner is set to Your user name (NOT Administrators(YourUserName)).
We have DMLogger running on 2 different Windows 7 machines here, and don't have any issues, but I do know we have changed these settings on ours. I am writing to a folder that I placed directly on the root of C drive...
Title: Re: Do-more and Ethernet
Post by: franji1 on June 17, 2014, 08:20:04 AM
Create a folder off your C:\ drive called "temp" and change your log to write to c:\temp\filename.txt (you can name it whatever you want, just something unique that you also use in the STRPRINT "#file:full-file-path" script)
Title: Re: Do-more and Ethernet
Post by: mhw on June 17, 2014, 08:55:43 AM
I did as both of you advised with no luck.
Title: Re: Do-more and Ethernet
Post by: franji1 on June 17, 2014, 09:33:24 AM
Create a different "temp2" folder below your Designer's project's folder (e.g. C:\Do-more\Designer1_3\Projects\temp2).  I assume Designer is able to create files in the "Projects" folder, DmLogger should be able to write to this "temp2" sub-folder (do NOT use "temp" as a sub-folder name because THAT is used by Designer internally).

Make sure you are using backslashes \ and not forward slashes /.
Title: Re: Do-more and Ethernet
Post by: plcnut on June 17, 2014, 10:17:53 AM
I think I found your problem. Check your spelling of "file".
Title: Re: Do-more and Ethernet
Post by: mhw on June 17, 2014, 11:14:26 AM
Thanks Nut.
That was my problem.
Sorry about the run around.