omron — Example

V+ Remote Library Documentation TYPE "Problem executing script: ", status PAUSE END .END rm.pc.fapp($file, $line, wait.time, status) Abstract Append a single line to a file on the PC Input Parameters Parameter Description $file The name of the file to append to on the PC. $line The line to append to the file. wait.time The amount of time to wait for the operation to complete. Output Parameters Parameter Description status Status of the operation:

0 = success, Example .PROGRAM ex1.rm.pc() AUTO REAL i, num.items, status AUTO $file, $to.file, $lines[3] AUTO $file.spec LOCAL REAL types[] LOCAL $items[] $file = "C:\log.txt" ; Write 3 lines in a file on the PC FOR i = 1 TO 3 CALL rm.pc.fapp($file, $TIME(), 1, status) IF (status TYPE "Failure to append line on file: ", status END END ; Append multiple lines in 1 call to the same file $lines[0] = "Line 1" $lines[1] = "Line 2" $lines[2] = "Line 3" $lines[3] = "Line 4" CALL rm.pc.fapps($file, 4, $lines[], 1, status) IF (status TYPE "Failure to append line on file: ", status END ACE Reference Guide, 18317-000 Rev A Page 817