Usage
Editor Usage
Load button will load the configuration file from the development
system's disk.
Save button will write the configuration file to the development system's disk.
Fetch button will load the configuration file from the runtime system's disk.
Send button will write the configuration file to the runtime system's disk. The next step is to restart or cycle power on the SoftPLC for the changes to take place. As an alternative to cycling power, you may enter "Remote Program" mode using NexGen, then select "Remote Program" a second time. This psuedo transition from Remote Program to Remote Program is a signal to the TLM that it should reload its configuration file. This way you can reconfigure without cycling power, although it does require you enter "Remote Program" mode (twice!).
Ladder Instructions
1) LOG_CSV
This instruction is used to write a row in a CSV file. This instruction is edge triggered and therefore will log once when the rung goes from false to true. There are three (3) parameters.
“Control:” - Control element (R) address. If log is successful, the Control .CTL Enable Bit (EN, bit 15) will be set true and the Control “.LEN” word will be set to zero. If an error occurs, the Control “.CTL” word error bit (ER, bit 11) will be set true, the Control “.POS” word value will be incremented, and the Control “.LEN” word will contain the integer value of the error. The Control “.CTL” and “.LEN” words are cleared when the rung is no longer true but the “.POS” value is retained. The possible values and respective meanings are:
0 = Logged OK 2 = Can't write to log file (unable to open) 7 = Can't create log file 8 = Group does not exists in LOGGER.LST 9 = Can't write to log file (disk may be full)
“Result:” - String element (ST) that will returns a text string indicating
success or failure. The string will correspond directly to the integer value set
in the Control “.LEN” word.
“Group:” - String element (ST) that contains the group name to log.
2) LOG_FILENAME
This instruction is used to retrieve the current log filename. This instruction is level triggered and therefore will execute when the rung state is true. There are two (2) parameters.
“Group:” - String element (ST) that contains the group name.
“Result:” - String element (ST) that will return the name of the current log
file for specified group. name provided.
3) LOG_FILECOPY
This instruction is used to copy a disk file to another name, such as to a removable media like a USB memory stick. This instruction is level triggered and therefore will execute when the rung state is true. There are two (2) parameters.
“Source:” - String element (ST) that contains the path and filename to be
copied.
“Dest:” - String element (ST) that contains the destination path and filename
of the copy.
Ladder Example
Log data once every 60 seconds and copy the log file to
/usbstick/currentlogfile.csv when a pushbutton connected to I:0/0 is pressed.