![]() |
Using the cRIO serial port in Java
I am looking for a Jave code snippet of how to configure the cRIO serial port and how to use it. Can it take over the System.Out functionality?
I am also looking for code to do formatted number to string conversion. Is there any native Java class? I need something simple. I do not need all of the Swing overhead. I am planning on sending data out the cRIO serial port into a PC running HyperTerminal to make an elaborate disgnostic screen. I will send it ANSI escape sequences to control the cursor. I've done this in C and it is a great tool for the team to maintain the robot. Daniel |
Re: Using the cRIO serial port in Java
I'm just a bit confused on what you mean by the serial port...
I thought the serial port from the module was to connect to the digital sidecar.... |
Re: Using the cRIO serial port in Java
Quote:
Have you considered using a TCP connection to the PC instead? -Joe |
Re: Using the cRIO serial port in Java
The serial port on the cRIO is the 9-pin D connector.
I prefer serial RS232 communications because it is simple. No setting of IP address, just plug and go. I've used this in the past and liked it. I am asking for an example of using the SerialPort class that has actually worked. Specifically the constructor with try-catch logic in Java. |
Re: Using the cRIO serial port in Java
Code:
package com.shadowh511.mayor.util; |
Re: Using the cRIO serial port in Java
Does this work regardless of the CONSOLE OUT switch position on the cRIO?
I do not want console data mixed in with my diagnostic data, so I prefer the switch in the OFF position. Can I still send data to the Serial port? |
Re: Using the cRIO serial port in Java
I would test that if i were you, I don't know
|
Re: Using the cRIO serial port in Java
Why does netbeans not find the valueOf() function?
Is there a special class to load? long l; String s; s = valueOf(l); |
Re: Using the cRIO serial port in Java
Because you need to use:
long l; String s; s = String.valueOf(l); |
| All times are GMT -5. The time now is 03:44. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi