Test controller, log event popup
This popup can be used to log events based on time or a measured value, the devices will be turned on at the start and off at the end. All connected devices will have a stable setting during the logging (See Param sweeper for logging with varying settings.
Typical uses is charge/discharge of batteries and steady state test of devices (How do a power supply handle X amps for 1 hour).
Contents
Settings
Defining on/off commands
On/off control
Start/stop
Scripting
Main page
Settings
- Time: Used for timed logging and is in seconds.
- Channel, min, max: Used for logging until a specific value, only min or max need to be filled.
- Stop expression: Can be used for more complex stop conditions.
- Init time: Time from devices are turned on until logging starts, this can be negative to start logging before the devices are turned on.
- Final time: Time from devices are turned off until logging stops.
- Log interval: How fast to log data
The 3 time values support usage of hh:mm:ss format and 3m or 1h format (m=minutes, h=hours).
Defining on/off commands
Pressing "On cmds" or "Off cmds" will open the above window where commands can be entered or captured. The easiest way to add commands is to open one or more device setup menus and use the needed commands in them, they will be logged into the text field.
Press the "Ok" button to save the commands.
The text field has a right click menu that can clear it or add setOn() commands for all devices. Adding all the setOn() commands and then deleting unneeded lines is a fast way to customise what devices is turned on/off.
When commands are defined the buttons will be marked with a green indicator.
On/off control
This popup can control on/off in multiple ways. Default it will use setOn() that is defined in the interface section of a device definition and it will turn on/off all loaded devices.
If some commands are entered in the "On cmds" section, they will be used instead of setOn() and a "Outputs off" will be used to turn everything off when done.
If commands are entered in both the "On cmds" and "Off cmds" sections they will be used to turn on/off devices.
The two sections uses the script system, i.e. it is possible to do scripting in them, but usually it is meaningless.
Start/stop
Generally only the "Start" button is needed, stop will be performed when the stop condition is reached. The "Stop" button can be used to stop early if something is wrong.
There is a indicator besides the two buttons, it will show:
- Yellow: Devices turned on, but logging not started yet.
- Light red: Logging started, but devices are not turned on yet (Init time is negative).
- Red: Devices turned on and logging
- Blue: Devices turned off and logging the final time.
Scripting
This popup can be controlled with:
#SETLOGEVENT initTime finalTime logInterval mode modeParam1 {modeParam2 {modeParam3}}
#SETLOGEVENTCMDS onCmds offCmds
#SHOWPOPUPSYSTEM LogEvent {x y {w h}}
#CLOSEALL
When the popup is open and filled in it is possible to generate a script with similar functionality:
This function can be found by right clicking in the log window.