Download Programming Manual

Transcript
A2D-3, A2D-3JP3, A3D & A3DJP3 PROGRAMMING MANUAL
VERSION 1.17
2 Programming guide
We choose Paradigm C++ 5.00.025 as programming environment for the
FALCOM A2D-3, A2D-3JP3, A3D and A3DJP3. That package includes all
necessary tools to build application for the FALCOM A2D-3, A2D-3JP3,
A3D and A3DJP3. The standard „C“ functions are contained in the standard
libraries of Paradigm C++. The different programming environment for the
hardware related parts of the FALCOM A2D-3, A2D-3JP3, A3D and
A3DJP3 are included in an additional library. That library „LIBA2.LIB“
contains hardware related serial, date, time and environment functions and
the syntax of those additional functions are listed below. For an overview of
the Paradigm C++ standard function please look at the online helps or try to
refer to it in a programming training course.
2.1 Serial support functions
The functions init_stream(), ComGetch(), ComPutch(), ComGets(),
ComPuts(), ComString(), ComStringCR(), ComGet() can be used to
communicate with those serial devices. The functions ComGetConfig(),
ComSetConfig(), ComLine() should be used for reading the current state of
the com port or changing the com port configuration. Please note that after
every function which returns the state of the com port (LineState), an
existing error condition will be cleared.
Parameter definitions:
#define PORT_COM1
#define PORT_COM2
#define PORT_COM3
#define PORT_COM4
#define PORT_COM5
#define PORT_COM6
0
1
2
3
4
5
// control values for set in ComLine()
#define LINE_SET
#define LINE_CLEAR
#define LINE_FLUSH
#define LINE_BREAK
#define LINE_UPDATE
#define LINE_RESET
#define LINE_MASK
#define LINE_DCD
#define LINE_DSR
#define LINE_CTS
#define LINE_DTR
#define LINE_RTS
#define LINE_RI
0x8000
0x0000
0x4000
0x2000
0x1000
0x0800
0x00FF
0x0080
0x0020
0x0010
0x0008
0x0004
0x0002
This document is a property of FALCOM GmbH and may not be copied or circulated without
permission.
Page 22