Additional Keyboard on serial port

Can I extend the KeyEvent class to handle more than those 114 keys?
I have an additional keyboard hooked up to the serial port.
I generate special custom KeyEvents with special KeyCodes after receiving certain bytews from the com port. I create new KeyStrokes using this KeyCode to be able to address this KeyStroke in a JMenuItem.
The problem is, that the standard KeyEvent spits out: "Unknown KeyCode:..." if I want to set the according KeyStroke as accelerator for a JMenuItem. This seems to stem from the method:
public static String getKeyText(int keyCode)
in the standard KeyEvent thatonly gets the text for KeyCodes between a lower and upper limit and my KeyCodes exceed this limit of course, since there is no space left.
Regards
Joerg Hoebelmann

And how about changing your scenario a little bit?
Since you have a special program to catch signals on COM port, you can enhance it with a logic to run the appropriate action from the menu directly.
If you want to stick to your solution you can try to take a look on the KeyEvent.java (source of KeyEvent.class) - maybe there's a possibility to break the limitation of 114 keys (but personally, I think it will not be possible)

Similar Messages

  • Keyboard on serial port under Solaris 8

    I've hooked a special keyboard into the serial port (/dev/ttya), and am trying to read from and write to it. I enable the port via "admintool" (with "initialize only - no connection" and only "software carrier" checked under options, and then set my port parameters via "stty" as needed. Then I can start up my C program to read/write to the keyboard. This works for a moment, but then "ttymon" seems to reset the port or something, which changes the port parameters and screws up my program. If I disable the port via "admintool", which kills "ttymon", then I can't set the port parameters as needed and run. I can enable the port, set the parameters, and then kill "ttymon", and then run my driver. This seems to work, but doesn't seem like the correct way to go about doing things. So what do I need to do? Any help would be appreciated. Thanks. Don

    Hi donernsdorff,
    You can disable ttya been monitored by ttymon and see if that helps. You can use pmadm command (Pls see man pages for details) to disable or change the port monitor settings. Hope this helps. Thanks. SUN/DTS

  • NI Serial Port / Eurotherm Temperature Controller

    NI Serial Port / Eurotherm Temperature Controller
    I am using a N.I. AT 232/4 board with four additional N.I. serial ports. First of all, after installing Windows NT (before I was using Windows 98) the NI Serial Port Diagnostics Program was not able to detect any of the ports even though the ports are correctly installed within Windows. When I was still using Windows 98 the NI Serial Port Diagnostics Program was able to detect all the four ports. Is it necessary that the diagnostics program detects the ports in order to use them with Lab View? I have also two regular Serial ports, which have never been detected by the diagnostics program, but I should still be able to use them with Lab view as well? D
    oes the NI Serial Port Diagnostics Program not function with Windows NT? Do you have an update version for Windows NT?
    I�m trying to control a Eurotherm 2416 and 903 Temperature Controller with two serial ports. Unfortunately, Eurotherm does not give support anymore about Lab View drivers for their Controllers, since they have developed their own Automation Program (iTools) now. I still want to control the Eurotherm Controller with Lab View via the serial port. Do you still have the driver VI�s for the 2416 and 903? It would be nice if you could send me the Eurotherm divers also along with some documentation.
    There is already a question posted about Eurotherm Controller (Eurotherm Temperature Controller not Functioning with NI Serial Board). It is probably a similar problem unfortunately the solution did not bring the right success. Therefore, I would like to ask you to specify the so-called 4-Wire mode.
    Thank You very much for Your help!
    Sincerely,
    Benjamin Thoma

    NI-Serial 1.45 does not install correctly on Windows NT Server 4.0 Terminal Server Edition. The driver (serial.sys), configuration utility (niports.cpl), and inf file (niserial.inf) are installed incorrectly to the user profiles directory.
    A workaround is to copy the files to the right folders which is detailed shortly.
    Definition: "%windows%" refers to the operating system folder. Note: The default operating system folder for this version of Windows is "Wtsrv".
    serial.sys - %windows%\system32\drivers
    niports.cpl - %windows%\system32
    niserial.inf - %windows%\inf
    Note: "niserial.inf" does not need to be copied unless an AT card is being used.
    The above files can either be obtained from the installation CD in the WinNT folder or from the hard-disk locations that they were
    incorrectly installed to which are detailed shortly. Note: Leaving the incorrectly installed files where they are will not harm the system. Definition: "%userid%" refers to the ID that was used when logging in to Windows.
    serial.sys - %windows%\Profiles\%userid%\Windows\system32\drivers
    niports.cpl - %windows%\Profiles\%userid%\Windows\system32
    niserial.inf - %windows%\Profiles\%userid%\Windows\inf
    For the newly copied driver to take effect the system must be rebooted.
    As for the instrument drivers, you can search our instrument driver site to try to find them. Go to "other driver resources" at the link below.
    http://zone.ni.com/idnet/
    For more information on the 4-wire mode, see chapter 6 of the "Serial Hardware and Software for Windows User Manual". I have included a link to the manual.
    http://digital.ni.com/manuals.nsf/caba5d53e9b015a186256793004eebb7/d1260d4fb98e3f228625699f005968d1?OpenDocument
    Kim L.
    Applications Engineer
    National Instruments

  • Using a PS/2 keyboard on a Sparc workstation through the serial port

    We have recently migrated an application that used to run on a PC, to now run on a Sparc Workstation. This is a SunBlade 1500, running Solaris 8. The application is running in a dedicated console which has a fitted keyboard and trackerball that have PS/2 connectors and cannot be changed.
    We need a way of connecting the PS/2 keyboards to the serial ports of the Sparc workstation. We already have a piece of software that will read ascii values from the serial port so we definately want to go through the serial ports.
    Can someone please suggest what converters will be required to get the output of the keyboard and trackerball as ascii input to the serial port.

    Actually, that's not a bit perverse, at all.
    Jonathan's suggestion is a standard method of connecting to a server.
    (null cable between the computer serial ports)
    ... see the Solaris man pages.
    man tip
    TeraTerm and Hyperterminal are customarily used on a PC running some dialect of Windows.
    The 'tip' command is all that's necessary between Solaris systems.
    PS/2 is not a serial connection, but is a keyboard/mouse interface 'invented' by IBM when they offered their XT-class PS/2 line of desktop systems, back in the 1980's.
    I found this next link by using Google:
    http://members.chello.at/theodor.lauppert/computer/ps2/
    The smaller DIN ports were more compact than the AT-class keyboard ports and the mouse moved from a serial port to a dedicated mouse port.
    Serial communication devices are not keyboards, per se,
    and keyboards are not serial communication devices.
    You need other hardware in between to translate what the human being sends, and another computer is a common method to accomplish that translation.
    Having said all that ...
    Since you cannot change the dedicated console hardware,
    I suggest you go to the manufacturer of that console equipment
    and have them suggest some sort of serial-to-serial interface lash-up.

  • Simulate Keyboard using serial pc port as an output. Use the pc as a Keyboard

    Hi everyone,
    I need to design an application to use a pc as a Keyboard using the serial port as an output to be connected to a ps2 port or serial port keyboard of another pc.
    Is it possible? Anyone Knows a solution or an example?
    I've seen a lot of examples about capturing keyboard events, but not about this case.
    Thanks in advance,
    Silvia

    One more thing I wanted to add is that since am not using a computer at the receiving end, the output data from the PC serial port has to be in PS2 format. But reading articles on some websites (http://www.computer-engineering.org/ps2keyboard/) it seems like I will need a 8042 keyboard controller to deal with all the handshaking and signal level protocol as the RS232 serial port protocol is quite different from that of the PS2 protocol.
    In the setup that I have, at the receiving end of the keyboard data I have a PCB (that has a ST uPSD3354DV microprocessor), that reads the PS2 input and displays it on an onboard LCD screen.
    So based on this information, if someone can provide me with some ideas or suggestions, that would be great.
    Thank you in advance,
    Shoab

  • X2200 M2 requires addition serial port

    I have some new X2200 M2 opteron servers that require addition serial ports, the server comes with 1, 9 pin serial port and with our other V40z servers we were able to use the DIGI serial port expanders PCI cards.
    the X2200 m2 server has
    Standard: Riser card assembly with two internal 64-bit, 8-lane, low-profile, half length PCI-Express slots
    Optional: Riser card assembly with one internal 64-bit, 16-lane, low-profile, half length PCI-Express slot
    1x 16 PCI-E riser supports
    DIGI will only support PCI - X so if If the new 2200 Opteron server has PCI-X slots, then the AccelePort Xr920 will work fine. was the response from DIGI
    any suggestions on how to get additional serial port on these servers.
    Thanks
    Earl

    Had this NET MGT port ever worked in past ? If not then I'd advise you to open a support case with Sun to get this checked. It might be that your NET MGT port is failed.
    -Mehul

  • Setting additional features of the serial port

    I have to set some features of the serial port which are not settable with the
    ordinary LabView examples or Vi's. What I am trying to set are:
    XonLimit, XoffLimit and Mask RXCHAR RXFLAG TXEMPTY CTS DSR RLSD BRK ERR RING
    How can I set these features?

    Open the VISA configure serial port vi and look how the basic settings are implemented. There is a visa property node that can be accessed : right click on it and select "properties" to access other parameters. You can either modify this vi, or create your own.
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • I pull fiftyfour bytes of data from MicroProcessor's EEPROM using serial port. It works fine. I then send a request for 512 bytes and my "read" goes into loop condition, no bytes are delivered and system is lost

    I pull fiftyfour bytes of data from MicroProcessor's EEPROM using serial port. It works fine. I then send a request for 512 bytes and my "read" goes into loop condition, no bytes are delivered and system is lost

    Hello,
    You mention that you send a string to the microprocessor that tells it how many bytes to send. Instead of requesting 512 bytes, try reading 10 times and only requesting about 50 bytes at a time.
    If that doesn�t help, try directly communicating with your microprocessor through HyperTerminal. If you are not on a Windows system, please let me know. Also, if you are using an NI serial board instead of your computer�s serial port, let me know.
    In Windows XP, go to Start, Programs, Accessories, Communications, and select HyperTerminal.
    Enter a name for the connection and click OK.
    In the next pop-up dialog, choose the COM port you are using to communicate with your device and click OK.
    In the final pop
    -up dialog, set the communication settings for communicating with your device.
    Type the same commands you sent through LabVIEW and observe if you can receive the first 54 bytes you mention. Also observe if data is returned from your 512 byte request or if HyperTerminal just waits.
    If you do not receive the 512 byte request through HyperTerminal, your microprocessor is unable to communicate with your computer at a low level. LabVIEW uses the same Windows DLLs as HyperTerminal for serial communication. Double check the instrument user manual for any additional information that may be necessary to communicate.
    Please let me know the results from the above test in HyperTerminal. We can then proceed from there.
    Grant M.
    National Instruments

  • Serial port: Input/output signal errantly combined

    I am currently in the process of using LabView to replace another user interface for a scientific instrument.
    LabView is connected to this instrument through a serial port.  The instrument streams 25 bytes of binary data every second to the computer.  I can read the binary string (VISA Read) and save contiuously to disk using a while loop.  In addition, there are a few instructions I can send to the instrument that will do various functions (start logging, turn LEDs on/off, etc).  I can successfully send these instructions to the instrument using the previous interface, and in a stand-alone vi using VISA Write, but when I place the VISA Write function into the larger interface vi, signals go haywire.  Specifically, there are two separate LEDs that I can toggle with two different commands, but when in the larger interface vi, both commands toggle the same LED.  Also, it appears that the singal I send to the instrument (a single ASCII character) immediately bounces back to the computer into the 25 bytes of streaming binary data.  In other words, after I press the LED "on" key, one column of my streaming data changes when it is not supposed to (ex: after Binary to ASCII conversion, it changes from a single digit to a twenty digit value).
    Initially, I thought the problem was the sequence of VISA Read/Write.  In the current configuration, I read all data, then allow for Write commands.  Both the VISA functions are within the same While loop to continuously monitor the data.  Is it possible the Write signal output is not leaving the while loop and being read as input?  What would make the instrument read two different commands as the same one?  My goal is to run an interface that displays the streaming data as ASCII, and allows for a few different toggle options while the interface is running - is there are more efficient/elegant way than a while loop?
    ~Going Bananas
    Solved!
    Go to Solution.

    New replies now in gray.
    CodeMunkee wrote:
    1.  If you keep giving me good advice like this, I'll be tempted to change the background to Baltimore prison purple.
    I'll ignore this statement.
    2.  The buffer now lives outside the loop.  I understand clearly.  Part of the problem might be my instrument - when I cycle power the 19 digit number that was 'echoed' disappears.  Forget about that display stuff, it works properly - I accidentally removed the time delay when editing the vi.   But you do bring up an interesting point...
    Without the delay, the loop ran much faster.  If the bytes weren't at the port, the read statement would have returned nothing when it read zero bytes, thus blanking out the indicator rather quickly.
    Yes, Hexadecimal display shows 04 to indicate the end of the 25-byte data sample.
    Doing a bytes at port read is not always a good idea.  If not all the bytes had arrived yet when you ask for the read, you won't get all the data.  The remaining data being sent in that stream from the instrument will show up at the front of the buffer on the next read command. 
    While this isn't a common occurence, it does happen.  How can I prevent this from ever happening?
    Since you know each commands ends with a hex 04 (ASCII character for EOT), you could enable the termination character when you configure the serial port.  Set the termination character to be 4.  Then when you execute the VISA read, read a large number of bytes such as 25 or more.  The read will terminate at either the timeout, the requested number of bytes, or when the termination character is read.  With this setup, you could eliminate the wait statement and also not request the number of bytes as the port.  The VISA read will control the pacing of the loop.  Any extra bytes after the termination character are part of the next frame of data and will wait around until the next time you read the VISA port.
      3.  Implementing your ideas for the latch button works better.  I am still encountering issues with these commands however.  Attached is the new vi.  There are two commands I want to send, 't' turns on the LED light (they blink for 30 sec then time out), and the latch works perfectly for that, 'p' turns on the magnetometer light (an additional 'p' is required to turn it off), but I cannot get the command sent to the mag while the loop is running.  It turns on either at the beginning of the vi, or at the end of the vi (after Finish button is pressed).  This leads me to think the command 'p' is stuck inside the loop.  I tried adding another film strip (see attached vi) for the toggles to force the issue, but it didn't work. Additionally, the 'p' command effectively works as a 't' command, and the LED lights begin to blink when I press the 'p' button.  This isn't supposed to happen, and leads me to believe the 'p' command does in fact exit the loop but in the wrong manner.
    The "film strip" is another frame of a flat sequence structure.  It enforces the order of execution.  The next frame can't execute until everything in the prior frame has completed.  It isn't necessary in your case because the Error and VISA wires determine the order of execution with respect to the other VISA statements.  But it shouldn't hurt.
    There is no reason the "p" case structure should behave any differently than the "t" case structure.  Although you should wire the error wire through in the False case of the "p" structure like you did for the "t" structure.  There is no "exiting of the loop" in either case.  The loop runs until the stop button is pressed.  I would check the manual to see that t and p commands do what you think they should do.  Do they need a termination character of their own when they are sent?  Should they be upper case letters rather than lower case?  You can run NI Spy on your serial port and see the operations occurring with it and see the data coming in and what data is going out.  I would be suspicious that the device is not handling the command properly.
    Any ideas?  I think I've tried to put the toggle buttons outside the loop before, but then could only toggle once before the loop took over.  Ideally, these toggles would be available at any time while the data is streaming, so therefore inside the loop?
    The toggle buttons need to be within the loop so that they can be read on every iteration of the loop.  Outside the loop, as you discovered, they are only read once at the very beginning before the loop is started.
    4.  Thank you for the suggestion about the Selection Mode for the Open/Create File option.  It is annoying to create a file first.  I made the change, but I still get error messages when I use a file that does not yet exist.  LabView takes me to the first Open/Create/Replace vi when the error occurs.  Is there something else I must do?
    On the open file VI, there is an input that is Open as default when unwired.  Create a constant there and change to Replace or Create.
    Remember, if you have any questions about the way LabVIEW is handling something with serial ports, close the port within LabVIEW.  Open Hyperterminal and try the commands from there.
    Message Edited by Ravens Fan on 01-13-2009 03:55 PM

  • Inconsistent prob when adding listeners to serial ports for sending AT cmds

    I have an app that sends and receives SMSs from two different cell phone carriers (lets say verizon and sprint by example).
    For that matter i have two cell phones, exactly the same model, one from each carrier, connected to the PC serial ports, COM, COM6 and COM7 being aware that they are available.
    -The application communicats with the phones through the a serial communication API and sending AT commands.
    -The application can send messages correctly from both phones within the same transaction, this is, i click in send message and the message is sent from both phones.
    The problem is when receiving, getting the SMS received by the phones:
    -When i have ONE phone connected to the PC it work properly for both phones.
    -When i have BOTH phones connected, only Carrier1 phone receives properly.
    When checking, i just find out that the problem rises when i try to add the listeners (see code comments below).
    When both phones connected there seems to be a problem that i cant figure out, and may be its a conceptual misunderstanding from me.
    I attach the code if you can help me,
    thank you,
    fernando
    // class fields
    private static String PORT_CARRIER1;
    private static String PORT_CARRIER2;
    private static CommPortIdentifier portId;
    private static Enumeration portsList;
    private static SerialPort carrier1SP;
    private static SerialPort carrier2SP;
    private static InputStream carrier1_input;
    private static InputStream carrier2_input;
    private static OutputStream carrier1_output;
    private static OutputStream carrier2_output;
    // ... all the code below is from the app method where everything is initializated     
    portsList = CommPortIdentifier.getPortIdentifiers();
    while(portsList.hasMoreElements()){
         portId = (CommPortIdentifier) portsList.nextElement();
         if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL){          
              // try to open ports
              try{
                   if(portId.getName().equals(PORT_CARRIER1))
                        carrier1SP = (SerialPort) portId.open("SMS", 5000);
                   else if(portId.getName().equals(PORT_CARRIER2))
                        carrier2SP = (SerialPort) portId.open("SMS", 5000);
                   else System.out.println("Error " + portId.getName());
              }catch(PortInUseException piue){
                   System.out.println("Exception while opening serial ports: "+piue.getMessage());
                   continue;
              // try to open input streams
              try{
                   if(portId.getName().equals(PORT_CARRIER1))
                        carrier1_input = carrier1SP.getInputStream();
                   else if(portId.getName().equals(PORT_CARRIER2))
                        carrier2_input = carrier2SP.getInputStream();
              }catch(IOException ioe){
                   System.out.println("Exception while opening input streams: "+ioe.getMessage());
                   continue;
              // try to open output streams
              try{
                   if(portId.getName().equals(PORT_CARRIER1))
                        carrier1_output = carrier1SP.getOutputStream();
                   else if(portId.getName().equals(PORT_CARRIER2))
                        carrier2_output = carrier2SP.getOutputStream();
              }catch(IOException ioe){
                   System.out.println("Exception while opening output streams: "+ioe.getMessage());
                   continue;
              // adding listeners
              try{
                   if(portId.getName().equals(PORT_CARRIER1))
                        carrier1SP.addEventListener(new ListenerPuerto(this, carrier1_input, "CARRIER1"));
                   else if(portId.getName().equals(PORT_CARRIER2))
                        carrier2SP.addEventListener(new ListenerPuerto(this, carrier2_input, "CARRIER2"));
              }catch(TooManyListenersException tmle){
                   System.out.println("Error while adding listeners: " + tmle.getMessage());
                   continue;
              // Adding specific event to listeners
              if(portId.getName().equals(PORT_CARRIER1))
                   carrier1SP.notifyOnDataAvailable(true);
              else if(portId.getName().equals(PORT_CARRIER2))
                   carrier2SP.notifyOnDataAvailable(true);
              // Setting params to serial communication
              try{
                   if(portId.getName().equals(PORT_CARRIER1)){
                        carrier1SP.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
                        carrier1 = true;
                   }else if(portId.getName().equals(PORT_CARRIER2)){
                        carrier2SP.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
                        carrier2 = true;
              }catch(UnsupportedCommOperationException uscoe){
                   System.out.println("Error while setting params for serial communication: " + uscoe.getMessage());
                   continue;
              // ... nothing else important ...thanks in advance

    Thinking of a java application as its what I am most
    comfortable with, but also thinking of having an
    apache server, and using jsp pages or servlets...
    because I hate formatting things in a java frame..
    have never quite mastered that! Any thoughts on what
    I should use?I'd prefer a Swing GUI for a maximum of controls. If you have any problems regarding layout, you can post concrete questions here (or even better: the Swing forum).
    And my main stumbling block would be how do I send
    signals to the green light from the computer? How do
    I get signals from the light beams to the computer?
    How do I use a serial port (for eg) from a java app.There's an additional library for serial I/O, it's named javax.comm ... should be downloadable somewhere on the java.sun.com site.

  • Msi 5124 serial port com1 com2

    i have a mainboard msi 5124 and want to use the serial port (COM1) for connecting a standard serial mouse. however i cannot get the mouse to work nor even be detected. not under dos nor under win98.
    before i used a ps/2 mouse, and never a serial mouse.
    most likely the pin-connections are not correct.
    can someone please give me a layout of the pins of the COM1 and COM2 port on the mainboard? on the msi homepage the manual is just 6 pages - which do not cover this information
    thank you,
    PS: the keyboard i am using is still ps/2 and is working fine.

    YOU CAN USE ACTIVEX COM CONTROLS IN YOUR FORM.

  • Serial Port Config

    I've seen this problem only on Solaris 10 6/06
    A port configured for Bi-directional modem does not
    initialize properly on startup. If one opens up SMC and
    re-saves the configuration it will work okay. But if the computer
    is rebooted, the configuration once again does not load.
    The work-around is to write a script using pmadm and ttyadm
    to manual reconfigure the port on startup.
    This new "feature" makes 6/06 unreliable for use in my remote
    data-acquisition network.

    With what are you reading and writing to the serial port?
    What is on the other side of the serial port? A serial port is not a loopback device - you cannot write to it and then read what you have written. To achieve that you need to run a null-modem cable between two serial ports in order to allow bi-directional communication via serial on the same platform.
    Also - why still use serial? It is old and outdated technology. We are not even wiring serial console ports any more. Ethernet management ports and lights out management s/w are far more superior, than a simple redirection of the console display and keyboard via a serial port.
    No more Fossil drivers. PPP killed SLIP. Internet kill the BBS star.. and Flash games killed Door games... Old style serial communication is pretty much dead on the modern computing platform.
    Unless you are hooking up something like a GPS device or FMC?

  • Serial port termination character status?

    Hello,
    I need to read a message from a serial port and I'm having some problems. I used the advanced serial communication example and came up with the attached program. Everything works perfectly fine except for the fact that if no message is sent for 10 seconds as designed the serial read outputs an error. I know normally I can check to make sure there are bytes at the port before I do a read operation which solves this problem. However, when using the buffer to terminate the read once a termination character is provided the bytes at port property always returns 0 so I can't use this as a conditional for reading the port.
    Is there a way to prevent the serial read from timing out in the attached program? Thank you.
    Attachments:
    serial_buffer.gif ‏19 KB
    serial.vi ‏15 KB

    Let me maybe give a bit more details about the application. I want to be able to get any amount of characters as a string that someone inputs in to the serial port. This will be a computer so I can expect the commands to usually be valid but I want to provide some additional redundency incase a person at a terminal is writing commands. The commands might be "measure 110" or it might be "set 23 34". So the amount of bytes being sent will depend on the command. I used 1000 as the byte count on the read just to provide as much room as possible, setting it to 100 doesn't really make a difference in this application, the same thing happens. If someone starts typing in a terminal "measure 110" (for example) but forgets to hit enter for the termination character the program will time out since the error cluster is connected to the stop button of the loop. When this happens the entire program needs to be restarted. Not really ideal.
    If I disconnect the error cluster from the stop button I noticed it works perfectly fine. After 10 seconds of the terminator character not being entered the buffer clears and the loop simply restarts. What I worry about is if there is some other fatal error (such as not being able to connect to the serial device) that the program will keep running. Is this something I even need to worry about?
    Attached is a screenshot of my latest program which works great but like I said I'm just worried about not wiring the status from the error cluster to the stop button since that seems to be what I've always been taught to do. If I wire the byte count to the number of bytes property it will only collect the number of bytes I set, since this will vary based on the command that won't really work in this application.
    Attachments:
    serial_buffer.gif ‏20 KB

  • Serial port configuration on PXI 8185 w/ 8423 card.

    I'm trying to configure wire mode for the serial ports on a 8423 RS485 card with the NI-RT.INI file, but it changes the RS232 ports on the controler. The Property node method doesn't work at all. Using LV-RT 7.1 and loading from mac OSX.

    I just figured it out. I was trying to set the wire mode on the RS485 to two-wire auto, and the RS232 to RS232-auto. The problem was that I had a 'WIRE_MODE=xxx' in my NI-RT.INI file, this disabled the ability to set the wire modes with the serial property node. In addition, the documentation has changed: The pre-VISA 3 instructions were to let (page 6-5 NI Serial Hardware and Software for Windows User Manual)
    RS485 4wire WIRE_MODE=128
    RS485 2wire DTR w/echo =129
    RS485 2wire DTR cont =130
    RS485 2wire auto =131
    but the new VISA serial has these as 0,1,2,3 respectively, with 128, 129 and 130 being RS232 wire modes. 131 is undefined now.
    So it is all working as of this afternoon. Was obtuse to find these errors though, and neither the NI-RT.INI file
    or the new VISA wire mode setting ability are documented correctly anywhere that I could find. Thanks for the offer of help!

  • Second serial port for CompactRIO

    I would like to reiterate the question posted here.
    Is it possible to add a second serial port to a CompactRIO chassis?
    Using the FPGA seems like it would not actually be transmitting at RS-232 levels, and using an Ethernet-to-Serial Port converter sounds more promising, but that means having the drivers loaded properly.  Are these the only options, and are they even feasible?  Having a multi serial port module seems like it would be a nice addition to the CompactRIO suite.

    Hi m3nth,
    The link involving using the FPGA and digital modules has been successful in the past with many people and like the tutorial says, a big part with this is converting to voltage using a voltage translator.  With respect to the ENET option, the link below can be used to direct you to the products that we have that you may want to try to implement multiple serial ports.  I've done some research and it appears that there shouldn't be an issue using the converters with a real-time system.  When using the ENET converters, keep in mind that it may cause some more latency in your network as opposed to regular serial transmission.  If you have any more questions, please let me know.  Thanks!
    http://sine.ni.com/nips/cds/view/p/lang/en/nid/10043
    Regards
    Noah R
    Applications Engineering
    National Instruments

Maybe you are looking for