omron — Example

V+ Remote Library Documentation rm.pc.fdir($file.spec, wait.time, num.items, $items[], types[], status) Abstract Perform a file and directory listing on the PC. Input Parameters Parameter Description $file.spec The file specification to match. wait.time The amount of time to wait for the operation to complete. Output Parameters Parameter Description num.items The number of items returned $items[] The listing of files and directories found types[] The types of the items found: 0 = File, 1 = Directory 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 ; Append multiple lines in 1 call specifying the start index CALL rm.pc.fapps2($file, 0, 4, $lines[], 1, status) IF (status ACE Reference Guide, 18317-000 Rev A Page 825