Hi Saifuddin,
I don't know what a pole display is, I assume it is some hardware connected to the serial ports. The lines of code you posted are DOS commands to set up the communication parameters (baud rate, parity, etc) on the COM1 and COM2 serial ports of the PC, then a space character is sent to each with the redirected ECHO.
I would recommend setting the parameters once, possibly before VFP is started. If you want to do it from within VFP, one way would be
RUN mode com1:9600,n,8,1
RUN mode com2:9600,n,8,1
Note there are many other ways which will probably have already been posted by the time I finish typing this in.
To send the space character to the serial ports from within VFP you could use
STRTOFILE(' ','COM1')
STRTOFILE(' ','COM2')
Alternatively you could place the two sets of code in BAT files and execute them from within VFP using RUN, ShellExecute, WScript, etc, etc.
HTH
Alan