Knowledge Base

The HMI430/700 has two TTL serial ports which may be used for MODBUS master/slave or custom serial communications.  They are labeled COM0 and COM1. The address for these ports is as follows:

  • COM0: 252
  • COM1: 253

The HMI700 also has a RS232 port that is shared with COM0.

The easiest way to configure these ports is to use the #Open_Serial instruction together with the #Port() directive.  Here’s an example of opening COM1 for user communications at 38400 baud and sending a “Hello World” message:

   #Include     File( "hmi430_io.spt" )     ;include the HMI430 I/O map (this sets "COM1" to 252)
#Open_Serial Port(COM1) User(38400,8,N) ;open COM1 @ 38400
iiPrintText COM1,"Hello World",13,10 ;send text out COM1