#import the pyserial module
import serial
import socket
import ncd_industrial_relay as ncd
#set up your serial port with the desire COM port and baudrate.
serial_port = serial.Serial(port='COM11', baudrate=115200, bytesize=serial.EIGHTBITS, stopbits=serial.STOPBITS_ONE, timeout=.5)
#instantiate the board object and pass it the serial port
board1 = ncd.Relay_Controller(serial_port)
board1.turn_on_relay_by_index(1)
board1.get_relay_status_by_index(1)
#board1.turn_off_relay_by_index(1)