Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Problem read Foot Pedal Action using RXTX

 
Ranch Hand
Posts: 32
MySQL Database Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have foot pedal from endoscopy medical machine. And it use RS232 serial port. And i connected using USB Serial Controller. I found library RXTX that handle serial port.

I already try the sample code from RXTX wiki, like this :



But i wonder, how to handle event listener, when foot pedal is touched/clicked?

Please help me, thanks before
 
Bartender
Posts: 1166
17
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't understand your question! You already are handling the events! What problem with this are you experiencing?

You should note that many USB to RS232 adaptors do not provide true RS232 signal levels and may not work with devices that do need proper RS232 signal levels. Also, you need to establish the pedal parameters such as baud rate, number of stop bits, parity and handshaking method. If , as I suspect, you don't have a data sheet for the pedal then you can determine the parameters using an oscilloscope.
 
Fandy Akhmad
Ranch Hand
Posts: 32
MySQL Database Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Richard Tookey wrote:I don't understand your question! You already are handling the events! What problem with this are you experiencing?

You should note that many USB to RS232 adaptors do not provide true RS232 signal levels and may not work with devices that do need proper RS232 signal levels. Also, you need to establish the pedal parameters such as baud rate, number of stop bits, parity and handshaking method. If , as I suspect, you don't have a data sheet for the pedal then you can determine the parameters using an oscilloscope.



I am new in serial programming in Java.
I try that code, but if i click foot pedal, it not do anything.

Thank you
 
Richard Tookey
Bartender
Posts: 1166
17
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Fandy Akhmad wrote:
I try that code, but if i click foot pedal, it not do anything.



Then the chances are you are not providing the correct configuration parameters and/or signal levels and/or handshaking and/or wiring and the datasheet for the device will give you the required information. As I said before, in the absence of a data sheet fo you need to examine what the device is outputting maybe using an oscilloscope. From this side of the Internet I can't really help any further!
 
reply
    Bookmark Topic Watch Topic
  • New Topic