Tcic user’s manual, 4 sample program – Omega Vehicle Security TCIC User Manual

Page 32

Advertising
background image

TCIC User’s Manual

30

4.4 Sample Program

The sample program is an improved version of Microsoft’s example
“Using the Comm Port”. This is a basic VB-Net program that clearly
shows how to communicate with the card. The sample program
works with both driver types (refer to section 1 - Main Features /
Communication). It detects which driver type (direct or VCP) is
installed and communicates with the card using that driver (the
type of the driver detected is reported in the title). More than one
TCIC board may be connected to the PC while using the sample
program; however, the sample program communicates only with
one board – the last one detected. Upon running the program,
press the ‘Check for Ports’ button and then the ‘Check for TCIC’
button. The box below this button should show something like
‘Using TCIC on COM7’ or ‘Using TCIC on USB1’.
Now, to send a command to the TCIC:
1. Type the required command in the ‘User Command’ Box.
2. Select the proper C/R mode:
* One or two character commands do not require C/R,
so ‘C/R’ should be unchecked.
* Three or more character commands do require C/R,
so ‘C/R’ should be checked.
3. Click the ‘Send User Command’ button, or press <Enter>.
Card’s response is shown in the frame on the right side.

Note
The sample program supports also a card that is configured to a
non-default (i.e., non-‘a’) address (refer to section 5). Its policy is
the same as with the TCIC-Monitor, that is:
* Upon initialization, card ‘a’ is selected (‘:a’), so, no matter what is
the current card’s address, it will be selected for communication.
Note that this implies that while using the sample program only
one board may be connected to the same port even though
RS485 is used.
* Upon termination, if card’s address is other than ‘a’, it will be
deselected. This ensures that a card will not remain in ‘selected’
mode and then connected to RS485, causing a situation of more
than one card selected in the same time. In other words, user’s
application should be the only source that selects a card.

Advertising