Interfacing with attached peripherals

I'm new to the boards, so if I posted this in the wrong place please forgive me.

I am writing a program to speed up a long process at work. Essentially it takes an Excel sheet with data in it and outputs text files with the information from the rows of the Excel file. This with a GUI and a JFileChooser works fantastic.

The output of the txt files are commands that are sent over a terminal program. So while I dont have to type anything manually anymore, I still have to pull up each text file to send to the device.

I want to interface the output so that it goes straight to the device. Currently it is going from a USB to Serial cable into a console cable. Would javax.comm help with this? I am not sure if the fact that it is not a true serial port would get in the way. If anyone has any insite on this I would be grateful. It doesnt seem like it is a very popular API so there isn't much out there. I have searched google the past 2 days and decided to finally ask through forums.

Sorry for the long post, but I notice there are usually more requests from other users for more information so I tried to include all pertianat info. Thanks again.

[1184 byte] By [ElCida] at [2007-11-27 6:16:43]
# 1

There may be two ways of accomplish this.

1) It might be possible to script another program to send the files for you. It sounds like you are (manually)interacting with some program to do this now (sorry if I am misunderstanding this). You could possibly do something with Runtime.exec then

2) Going directly to the serial port. I don't know whether it will work in your particular situation or not. This thread is the best reference for this type of thing on these forums http://forum.java.sun.com/thread.jspa?threadID=698876&start=0&tstart=0

Thanks for taking the time to ask a "good" question. You provided information that does explain what you are looking for and bonus points for an informative subject line. I wish I knew more about javax.comm so that i could help you more.

Good luck

cotton.ma at 2007-7-12 17:28:43 > top of Java-index,Java Essentials,Java Programming...
# 2

for serial port communication you have to use the Java COM API (javax.comm).

Enumerate all the installed ports and then open the specific port with specific settings and send the commands from files to the device also you can monitor the response from the device.

http://dn.codegear.com/article/31915

jawadhashmia at 2007-7-12 17:28:43 > top of Java-index,Java Essentials,Java Programming...