EasyManua.ls Logo

FEC PP-9715W - Page 19

Default Icon
23 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
PP-9715W | USER MANUAL
Pag.19
2. COM Port
-
int intSerialPortHandle = -1; int
intReturnCode = -1; private int
intBaudRate=9600;
private String strTestString="testStringtestString";
String strttyUSBPath;
SerialPort sp;
private void SleepMiniSecond(SerialPort spThread, int minSecond)
{
try {
spThread.sleep(minSecond);
dump_trace("SLEEP_MSEC="+ minSecond);
} catch (InterruptedException e) { e.printStackTrace();
}
}
private boolean RS232_Test
{
int intDataReceivedLength=0;
sp = new SerialPort();
strttyUSBPath = "/dev/ttyUSB0"
intSerialPortHandle = sp.open(strttyUSBPath,intBaudRate);
byte[] btyVersion_msg_received = new byte[256];
Arrays.fill( btyVersion_msg_received, (byte) 0 );
intReturnCode = sp.write(intSerialPortHandle,strTestString.getBytes());
COM1 = /dev/ttyUSB0
COM2 = /dev/ttyUSB1
COM3 = /dev/ttyUSB2
COM4 = /dev/ttyUSB3
COM5 (LCM/VFD)
=
/dev/ttyS1

Related product manuals