Description
DS200FGPAG1A PC Communication Program
The DS200FGPAG1A Get Communication Port Address instruction (GET ADDR instruction) is used to read the station address of the CPU port specified by PORT and place the value into the address specified by ADDR. The Set Communication Port Address instruction (SET ADDR instruction) is used to set the communication port (PORT) station address to the value specified by ADDR. The new address that is set is not permanently stored; after a power failure and power up, the communication port address will revert to the last address value (the address downloaded with the system block). Figure 2 shows the flowchart of the communication program using the RCV instruction and the receive completion interrupt to receive data.
DS200FGPAG1A in the Windows environment, the operating system through the driver to control the various hardware resources, does not allow the user as in the DOS environment, as directly on the serial port of the underlying operations. For this reason, Visual Basic provides a serial communication control: MSComm control. Programmers only need to set and monitor the properties and events of the MSComm control, you can easily and easily realize the serial communication.