What's the best way to store text data logs onto a PC?
Brent Simpson
Posts: 36
I use NetLinx panels to automatically manage buildings without users having to touch anything. The systems tend to generate large text logs (during the set phase) of which I've been using a local PC to log via Hyperterm but thought why can't I just get NetLinx to create a new file on the local PC each day and just send data to it as required? I've used the File_ commands to create files read and write to the 'disk on chip' so logically I figure it should be able to go to a PC. Could anybody point me in the right direction to do that? Example ot technical doc would be useful....
Many Thanks!
Brent - Am suffering Brain Fatigue!
Many Thanks!
Brent - Am suffering Brain Fatigue!
0
Comments
http://amx.com/techcenter/downloadConfirm.asp?fn=/assets/applicationFiles/i!-FTPSenderSetup.exe
You can also email a daily log to yourself or any body else you want. DHawthorne wrote a DevTermLogger module http://amxforums.com/showthread.php?t=1187&highlight=devtermlogger
that you can use to create a daily log and then use i!-EquipmentMonitor to email it.
I've started toying around with this and it works quite well actually. I just need a reliable PC to run the syslog on.
I already use the i!-EquipmentMonitor to email system offlines, faults, errors and temperature irregularities to me. It's very useful - I usually know there's a problem before the owner or site managers!
I started storing the data to disk on chip and FTPing it across but the files tend to get fairly large by necessity during setup stages - 120->400Mb per day depending on the size of the system. it tends to stall the master if it gets out of hand....... Hyperterm across the LAN seems to be the best way but once again it has to be a fast link otherwise the master stalls intermittantly.
I was hoping I could somehow use the File_Create / File_Write_Line commands to create a new file on a PC HD and write to it as required. Could see anything in help files / NetLinx manual - Is this not possible?
Maybe I need to create small files and FTP them out 100k at a time?
I'm just making it up as I go along so it may not be practical?
Brent
Is that a typo? If not, what are you logging?
No that's not a typo. The short answer is - it's logging text strings that are created as it processes each event. It's a bit complicated to explain - the system is totally event driven from any input so apart from a requirement to process and update a room status every 10 sec there is next to no main line program code. As in any building, anything can happen at any time and that means a lot of logging needs to be recorded in order to identify and correct errors and unforeseen events. So far the largest residential system we've installed manages 48 rooms, including 68 sensors (movement/door bugs), 270 lighting circuits, Diesel Boiler, 28 x individually monitored and managed UFH arears, Full Pool/Spa control, 60 Roller shutters, 2 x Access Controled doors plus 2 remote gates, 4 Sony IP dome cameras, 3phase power monitoring / UPS monitoring and sewage treatment monitoring. It's managed on one NI-4100 and 2 NI-700's for co-processing plus 1 x NXI for Boiler/Pool/Spa and Heating Management. Everything is displayed and controlled via one MVP-8400. Admittedly there are 160 CBus keypads to overrride the lights but they are only used as a last resort.
The older NI-X000 controllers struggled a bit but the newer NI-X100 cope quite well. It takes several weeks for the system to 'adapt' to the occupiers, after which only error logging is required which reduces the log to 20k - 1M per day depending on what the users are doing, power surges and errors that crop up from time to time.
I assume you must not be able to run the code on a standard NI-4100? According to the AMX web site those ship with only a 128 MB CF card. (I?m wondering if that is an error since the NI-3100 says it comes standard with 256 MB) Even if the NI is upgraded to its fullest capacity (1G) that will give you less than 3 days of run-time before the CF card is full if you?re blasting it with up to 400 MB per day. I can understand why you say the logging tends to stall the master if it gets out of hand.
Yep it can be pretty time consuming, but I've developed ways of cutting through the files pretty quickly. Pathway was designed to manage itself (well an honest attempt anyway). Sometimes it has a mind of it's own so logging a lot of data is the only way I can think of to figure out what caused odd things happen. I'm hoping in 10-15 years this type of technology will be standard in most houses - if for no other reason than for energy management. All you need is an NI-700, compatible security system, Lighting system and a Keypad/Touch Screen to manage it.
Thanks for you input guys!
The other way of approaching it which I have found useful is to set up some debug messaging functions in a nice neat include: This approach lets you permamently place all your debug messaging throughout your code and allow you to change your debug messaging levels and where the messages go. That way you can set up rather thorough debugging (ie a message for each event) that you have the option of turning off when you're not interested in what the system is doing.
Thanks Kim, I already do that to a certain extent but it's based on Function processing, I/O and System types rather than just levels. It's set up so that I can alter the logging remotely while it's running. I suppose I could extend that approach to log individual room numbers and system I/O which would reduce the logs - good thought!
I am working on doing something similar, but with hopefully less data being generated I will let you know if I find out anything interesting about the processors and creating that many web page requests quickly.
Jeff