The transmission functions include a copy, a ping, an email, and an FTP function.
This function copies data (DT/WI registers) from a source to a target.
This function can be called continuously.
If the target is a PLC, make sure to write to your defined data area to avoid program runtime errors in the target PLC.
The target can also be the internal memory areas of the FP-I4C unit ("INTERN"). This is useful, for example, to collect data from different sources and make it available in HTML pages or supply it to the data logger.
FPWEB_COPY_DT(source interface, source station number, source DT/WI address, target interface, target station number, target DT/WI address, number of DTs/WIs);
The function returns 0 if successful or -1 if an error has occurred.
FPWEB_COPY_DT("RS232", 1, 10, "INTERN", 1, 50, 30);
The name of the communication interface of the source device
"RS232"
"RS232_L": Function code 0x04 [input register] instead of 0x03 [holding register], for Modbus only; if used for other protocols, it will be treated as "RS232".
"RS485"
"RS485_L": Function code 0x04 [input register] instead of 0x03 [holding register], for Modbus only; if used for other protocols, it will be treated as "RS485".
"USB"
"ETHERNET": Communication via Modbus/TCP
"ETHERNET_L": Function code 0x04 [input register] instead of 0x03 [holding register], for Modbus/TCP only.
"INTERN": INTERN refers to the internal memory areas.
The station number of the source device
1–99: all interfaces
100–247: additional addresses for ETHERNET
0: Multicast (serial interfaces)
A DT start address in the source PLC or a WI start address in the FP-I4C unit
The valid DT address range varies depending on the PLC type and the protocol used. The WI address range is 0 to 33120.
The name of the communication interface of the target device
"RS232"
"RS485"
"USB"
"ETHERNET": Communication via Modbus/TCP
"INTERN": INTERN refers to the internal memory areas
The station number of the target device
1–99: all interfaces
100–247: additional addresses for ETHERNET
0: Multicast (serial interfaces)
A DT start address in the target PLC or a WI start address in the FP-I4C unit
The valid DT address range varies depending on the PLC type and the protocol used. The WI address range is 0 to 33120.
The number of registers to copy
The valid range varies depending on the PLC type and the protocol used. For the FP-I4C unit, the range is 1 to 33121.
This function controls the active email transmission similar to the PLC-controlled email client function.
Use this function only if you need additional settings that cannot be made on the Script page.
This function can be called continuously.
Transmission starts as soon as the specified time is reached if the file to send is available.
FPWEB_EMAIL(file format, rename text, splitting mode, time, cycle, number of retries, file number);
Number of transmitted files or 0 in case of no files to transmit
The file name format of the source file to be sent in quotation marks
"DEFAULT_FORMAT": Use this value if you have selected a user-defined format file.
Batch numbers without a date information cannot be sent correctly.
Example: "AnyName%y%m%d_%H%M%S_TRG).CSV"
The file name extension for successfully transmitted files
Any character string (max. 7 characters)
Empty: The default file name extension ".CS_" is used.
"DELETE": The file will be deleted.
File splitting information to detect currently active log files and to avoid sending incomplete log files
Example: For "DAY"
, only files from before the current day will be sent.
If file format="DEFAULT_FORMAT", the splitting mode set in the user-defined file format is applied.
The starting time of the transmission after midnight in seconds
0: Default value (midnight)
If the value set is < 120s (or 0 for midnight), the system will start the transmission 120 seconds after midnight. This ensures that the data of logged midnight values is not being transmitted.
Example: For a value of 43200, the first transmission of the day is at 12:00.
The transmission cycle or the "try to transmit" time in seconds. If the time difference to the last transmission is shorter than the cycle time, the function terminates.
Together with the value for time, this defines the transmission cycle.
60: Default value
Example: For a value of 60, the function tries to send files every minute.
The maximum number of retries if the transmission was not successful
After the maximum number of retries has been reached, the function terminates.
The number of the log file
0 to 15: File number
-1: All log files
This function controls the active FTPC transmission similar to the PLC-controlled FTPC function.
Use this function only if you need additional settings that cannot be made on the Script page.
This function can be called continuously.
Transmission starts as soon as the specified time is reached if the file to send is available.
FPWEB_FTP(file format, rename text, splitting mode, time, cycle, number of retries, file number);
Number of transmitted files or 0 in case of no files to transmit
The file name format of the source file to be sent in quotation marks
"DEFAULT_FORMAT": Use this value if you have selected a user-defined format file.
Batch numbers without a date information cannot be sent correctly.
Example: "AnyName(%y%m%d_%H%M%S_TRG).CSV"
The file name extension for successfully transmitted files
Any character string (max. 7 characters)
Empty: The default file name extension ".CS_" is used.
"DELETE": The file will be deleted.
File splitting information to detect currently active log files and to avoid sending incomplete log files
Example: For "DAY"
, only files from before the current day will be sent.
If file format="DEFAULT_FORMAT", the splitting mode set in the user-defined file format is applied.
The starting time of the transmission after midnight in seconds
0: Default value (midnight)
If the value set is < 120s (or 0 for midnight), the system will start the transmission 120 seconds after midnight. This ensures that the data of logged midnight values is not being transmitted.
Example: For a value of 43200, the first transmission of the day is at 12:00.
The transmission cycle or the "try to transmit" time in seconds. If the time difference to the last transmission is short, the function terminates.
Together with the value for time, this defines the transmission cycle.
60: Default value
Example: For a value of 60, each minute the function tries to send files.
The maximum number of retries if the transmission was not successful
After the maximum number of retries has been reached, the function will terminate.
The number of the log file
0 to 15: File number
-1: All log files
This function checks the communication with other network devices.
The number of ping calls and the ping interval will influence the operation of the script (sequential operation).
FPWEB_PING(IP string, number of ping calls, ping interval);
Number of ping calls with successful answers
DT[10] := FPWEB_ PING(“www.panasonic.com”, 3, 1000);
IP address or URL of the device to test
Number of ping calls to send
Time in seconds (value < 300) or time in ms (value >= 300) between the ping calls