hi there, I do have a question to ask you regarding the ascii. Basically i've written a java program that send a bunch of ascii text out to seiral port. The serial port is connecting to plc. I've try to send this from hyper terminal and it works fine. The problem is when i try to do the same thing but in java instead the program didn't work as expected. This is the list of command that i've sent from hyper terminal " alt-2(stx)100A00135alt-3(etx)CE " and plc output lit at y0,y2, y4,y5. I've try to do this exact command in java which is : String mn = "02100A0013503CE" ;
output.write(mn.getBytes());
and this does not work ( the indicator on y0,y2,y4,y5 did not lit ) . I've also try to work around this using
String mn = "02 1 00A0 01 35 03 CE" ;
and String mn = "STX100A00135ETXCE" ;
and String mn = "STX 1 00A0 01 35 ETX CE" ; and none of it work at all. Do i needed to insert a special command which make sure that stx and etx is sending properly rather than sending s and then t and then x