Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: plcfox on July 19, 2014, 12:30:52 PM

Title: Do more logger on remote subnet
Post by: plcfox on July 19, 2014, 12:30:52 PM
Is it possible for the domore logger to run on a different subnet from the PLC? Any other options for logging to a network folder?
Title: Re: Do more logger on remote subnet
Post by: BobO on July 19, 2014, 05:01:45 PM
The DMLogger device on the PLC is just a UDP device broadcasting on port 0x7272, so depending on network configuration, that may or may not work. DMLogger itself is just listening for UDP packets on 0x7272, so anything that arrives he should log.

I haven't tried it, but you should be able to create a new UDP device on the PLC and use PACKETOUT (port 0x7272) to target DMLogger's IP address. I can't see why that wouldn't work.
Title: Re: Do more logger on remote subnet
Post by: plcfox on July 21, 2014, 09:10:02 AM
Using packetout to the IP of my pc works.

I am sending this string  every 5 minutes to the logger, which saves a csv on my network filed by date

"#file:\\#####\####\#####\#####\#####\######\Vault\Climate Control System\logs\" SDT0.Month "-" SDT0.Day "-" SDT0.Year ".csv#" FmtTime(SDT0,24h) "," R0 "," R1 "," "," R2 "," R3 ","

R0-4 are temperature and RH values for in a records storage vault, and outside the building. Actually I'd like to log these and other values with out having to run the logger, but I don't have any ideas yet, short of adding an HIM, which I may end up doing. Suggestions?

Thanks.
Title: Re: Do more logger on remote subnet
Post by: plcnut on July 21, 2014, 12:16:16 PM
I'd like to log these and other values with out having to run the logger

If you have a server running WAMP or IIS then the code is pretty simple to be able to save a log.
What is the PC/Server you are trying to log to?
Title: Re: Do more logger on remote subnet
Post by: plcfox on July 22, 2014, 07:24:53 AM
right now I am just running the logger on a virtual pc and saving to a network folder. I have a laptop on which I can try running a web server....
Title: Re: Do more logger on remote subnet
Post by: plcnut on July 22, 2014, 07:50:39 AM
DoMore can do OPENTCP to the specified servers IP, you can then do a STREAMOUT with
Code: [Select]
"GET http://xxx.xxx.xxx.xxx/YourWebPageName.aspx?action=SaveLog&Data=xxx&Time=xxx$0D$0A"You can embed up to 8192 bytes into the GET request for most servers.
Now on the server you can set up a page using Visual Studio (for .aspx) or you can use NetBeans for .php, and then use the 'action' to call the proper code to save or append the proper .txt file in your file system. If you have someone familiar with .net or .php, they could probably put together a page pretty quickly, otherwise google is your friend for making it work.
I can help you troubleshoot code, but you will have to do the work ;)