Menno1977
15th October 2002, 15:13
Hello all,
I have a question. Is it possible to communicate with a device that is connected on a com-port(rs-232)?
If so, can anyone tell me where to start looking...
zacharyg
15th October 2002, 15:57
Hello Menno,
Here are the functions which allow the auxiliary port to be used.
I have never used them before.
void AUX.CLOSE ()
long AUX.OPEN ()
void AUX.PRINT ( string strg(.) )
DESCRIPTION
These functions are intended for sending data to any device connected to the aux-port of the terminal.
void AUX.CLOSE()
This function closes the aux-port; after calling this function it is not longer possible to send data to the aux-port.
long AUX.OPEN()
The AUX.OPEN function opens the connection to the aux-port after which printing is possible. It returns one of the following values:
0: OK
-1: fatal error
-2: aux port busy
-3: configuration not ok
-4: not supported by this server
void AUX.PRINT( string strg(.) ) This function sends a string to the aux-port, which must be opened beforehand.
Example:
if aux.open() < 0 then
message("aux-port error")
else
aux.print("......")
....
aux.close()
endif
Good Luck
shah_bs
21st December 2004, 18:22
How would it be possible to READ data from a COM port? [The aux.* functions allow to write to it only.]
[The reason for the question is as follows: The application is a wire cutting machine that sends the quantity of wire out to its port, which can be connected to a com port. If I can read this quantity, I can pass it on to suitable sessions in BAAN (notably, maintain and release outbound data) to automatically decrement the inventory of wire reported consumed by the wire cutting machine.]
Joy Conner
29th December 2004, 21:29
I too read a weight from serial port. My application does not use the aux.* commands. My process executes a PC application which reads serial port and copies data from pc to unix host and into baan variable.
I don't know how to put the link in this response but search this forum on "serial port" and select the thread "Unknown Message???". If it is useful, the code is posted.