• Post Reply Bookmark Topic Watch Topic
  • New Topic

RS 232 port control

 
akoda Svenson
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am a java newbie but I know this isn't a newbie topic. I need to write an app that will send and receive through an RS232 port. The device(s) that I will be connecting to is an analytical balance. The only comm thing I have found while googleing so far is Java(tm) Communications API at http://java.sun.com/products/javacomm/downloads/. Is this the latest greatest? This is for v1.2 can this be installed with 1.4??

Thanks
Sven
 
Joe Ess
Bartender
Posts: 9362
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this the latest greatest?

Yes


can this be installed with 1.4??

Yes
 
akoda Svenson
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Joe Ess:

Yes


Thanks I finally got the install done. I had great issues with that. Is there any other documentation on how to write a simple program then what is available at sun?

koda
 
Joe Ess
Bartender
Posts: 9362
11
Linux Mac OS X Windows
 
Karen Baog
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's a code that can open an RS232 port:
Serial Setup

Note that in the code you will see that you need to open the port first before calling the SerialPort.setSerialPortParams method to set your parameters.

As you can see in this thread I still have a problem with sending data. But the code should open an RS232 port. In this example, it's "COM1" of a PC. For Linux O/S, it would be a different name.

Karen
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!