10 REM *** 12 REM Example Communication Program for F2-CP128 14 REM 16 REM This is a generic example showing how to read data 18 REM from a scale, parse numeric data from the 20 REM string and write the numeric data to the PLC 22 REM 24 REM This example assumes that the data is in the following format: 26 REM ####.##gCRLF 100 REM *** 102 STRING 2551,254 : REM Allocate String Space 10*254 Strings 104 SETPORT 1,9600,N,8,1,N : REM Programming/Monitoring 106 SETPORT 2,9600,N,8,1,N : REM Scale 108 SETINPUT 1,1,10,0,1000,20 : REM Define how INPUT will work 110 REM --- 112 PRINT1 "Requesting Data" 120 PRINT2 "S" 130 REM --- 132 INPUT2 ,$(0) : REM Input Data to String 0 ($(0)) 134 IF INPLEN=0 THEN PRINT1 "Device Timed Out" : GOTO 130 136 SDTA=VAL(MID$($(0),1,7)) : REM Parse Data from String 138 S205_VB(2000)=INT(SDTA) : REM Write Integer Portion of Data to PLC 140 PRINT1 "Data= ",SDTA 160 REM --- 162 GOTO 112 : REM Loop