Bytes at serial port

This subVi reads the number of characters that currently contains the serial buffer. Figure 1 shows the block diagram of the subVI.

Fig. 1 Determination of the number of characters in the serial buffer

This subroutine is used by all routines that send commands to GSM modem. If the number of characters is zero then each routine performs its function. The subVI sets the corresponding logical variables if thenumber of characters in the serial buffer is 17 and 18, which indicates that probably the SMS message is received.