Output to com port

hi,
pls i'll like to know how i can get my program to sent bytes to the com port of my computer system. I suppose there should be something in the java.io package

Nope !! there is no option in java.io package.
You have a package by name javax.comm which will let you to read/write data to any desired port.
Download it from sun's site along with the required .dll file.
Hope this helps !!

Similar Messages

  • Question about output the com port signal

    Dear all,
    I can successfully change the received signal from COM1 into ASCII, and I can use System.out.print to output the ASCII. However, I cannot output the received signal in the JTextField.
    Could anyone help me to solve this problem please?
    Thank you so much

    May I suggest the setText() method?

  • Output Signal From a Desktop Flash application to the COM port

    How do I script to connect /send a signal to the COM port of
    the PC from a Desktop Flash application.
    The Signals can be variables such as "1/2/3/4" . The signals
    will be send on a corresponding click in the flash application. For
    eg: if I click button "A" in the Flash application, it sends a
    signal "1" to the COM Port. If I click the Button"B", it send the
    signal"2" to the COM Port.
    Please advise if it can be done directly or through a Third
    Party software.

    maybe this helps:
    http://www.phidgets.com/downloads.php?example_id=27

  • Im using a pci-6221 daq-card.I want to know the difference(use)of a line output and a port output.

    Im using a pci-6221 daq-card.I want to know the difference(use)of a line output and a port output.

    Hello Hellraiser24,
    This question has actually been discussed in another thread here:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=95895&requireLogin=False
    I hope this helps,
    E.Lee
    Eric
    DE For Life!

  • How to Use Com ports on oracle forms

    Hai,
    how we can use com port to communicate to the device like Pole Display(output device) or fixed scaneer (input device) having serial port(Input device) in oracle forms.
    Thanks & regards

    For web forms you will probably need to create a PJC and/or use webutil and make calls to the device's API.

  • How to read COM port in Developer 4.5 or 6i?

    Dear all
    Have any one please let me know how to create forms with Developer6i join Barcode Scanner in COM port?
    At the time, I import OLE Library interface to be developer's package body (Component MSCOMM32.OCX) It isn't efficiency.
    Have any one Please let me your method and how to ?
    Thanks a lots.

    Parallel threads are easy in Labview.  You just create two loops where the output of either loop is not connected to the input of the other.  Without this data dependency, the two loops run in parallel.  See the attached vi, my producer-consumer template.  Replace the random number generator in the top loop with your serial port code.  Put your other processing code in the bottom loop.  Use the queue to pass info from one loop to the other.  You can signal the lower loop when the serial port receiving is done by putting something on the queue that signifies the completion (like a "done" string).  Your lower loop will constantly check the queue, looking for the "done" string.  You can use a boolean if you remove the string wires and replace them with boolean types.
    Bytes at Port will look at the serial port buffer and report the number of bytes sitting there waiting to be read.  Call it before you read, and pass the number from bytes at port to the read function.  Search the LV examples for serial port and you will see how bytes at port is used.
    Message Edited by tbob on 10-04-2005 03:51 PM
    - tbob
    Inventor of the WORM Global
    Attachments:
    ProducerConsumer.vi ‏40 KB

  • VISA resource name control: want to refresh list of COM ports programatically

    When the app is running, and you first click this control, it takes 2-5 seconds to respond and populate the list for the first time.
    Therefore, I want to auto populate the first time the application is loaded. Can I do this?
    Solved!
    Go to Solution.

    Hi,
    I'm joining in here since the thread addresses delay problems when using VISA resources.
    I would like to share my experience when using VISA on real-time targets.
    The hardware I use is a cRIO NI-9074 with two NI-9870 (4 x RS232 each) and one NI-9871 (4 x RS485). These modules are used in scan mode to avoid excessive port programming in FPGA.
    My first problem was that the twelve COM ports of the NI-9870/9871 modules did not show up in the list of available VISA resources when placing a VISA resource control on the front panel or a VISA resource constant on the block diagram. However, the workaround using "VISA Find Resources" seemed to work fine. When starting the real-time program from the development machine, the list was populated and by indexing the list I was able to use the port.
    BUT: When building an RT executable from this VI, deploying it to the RT target and setting it as startup, nothing happened. It took me some time to find out, that there has to be a significant delay (in my case about 10 s) before calling the VISA Find Resources function. Otherwise it will not give the correct output. By some reasons, the ports do not seem to be available when the RT startup application begins to run. I tried to play with the delay and found out that the resource list would be empty when calling the VISA Find Resources function almost immediately on startup, after a few seconds it would return the ports of the first NI-9870, after seven seconds the ports of two modules, and after about ten seconds all ports would be available.
    I would appreciate if somebody could tell me what happens since it was quite a pain in the ass to solve this issue.
    Best regards,
    Karsten

  • How Do I read in from a COM port?

    I am running a project, and i need to read in four streams of numbers from the same serial port and output them to the screen, preferably as graphs. My current problem is reading the data in from the serial port. I have downloaded the commapi from the Sun website, but when i try to compile the example file SimpleRead.java i recieve 24 errors. What can i do and how can i read from this COM port. Please help.

    Fix the 24 errors

  • Write among COM ports in the same PC without cables

    How can I write to the memory address(es) of a serial COM port?  I would like to send data from one serial COM port to another in a manner similar to the that of the 'Simple Data Client' and 'Simple Data Server' vi examples.  This must sound strange since this is exactly what a null modem cable will do, externally.  I would like to eliminate the cable connection between COM ports that exsit in the same PC and communicate between them, internal to the PC, somehow. 
    Currently, I am using a LabVIEW vi to read a serial message on COM1, translate it, send the trsanslation out on COM2, so that a separate windows program (no .DLLs to interface with LabVIEW) can read the message on COM 3.  COM 2 and COM 3 are connected by a null-modem cable.  This requires three COM ports, and two serial cables.  I realize that I can use a physical loop-back jumper on COM2, for instance, where I send and read the translated message on COM2, but I still wonder if there is a method for doing this in memory, or something. Is there a way to accomplish the same objective with one cable (into COM1), no loop-back jumpers, and only two serial ports?  In summary, I want to read on COM 1, translate in LabVIEW, then write directly to another COM port, internally, without using a serial cable.  Can the 'IN PORT' or 'OUT PORT' vi's apply here?  Are these tools only for parallel ports?
    Hope this is not too confusing....  It seems like I am always trying to do something with LabVIEW that was not meant to be done....
    Thanks.

    Thank you.  If I pay the price they ask, this looks like it will create and share virtual COM ports - exactly what I need.  However, I would really like to find a way to do this in LabVIEW, such that I do not have to make my application dependent on another piece of third party software.  The 'Simple Data Client.vi' and 'Simple Data Server.vi', included in the shipset examples, seem to do this for TCP/ IP ports.  I wonder why the COM ports cannot be addressed at the memory level, in a similar manner???

  • Can two users share a COM port?

    I have a system services Labview executable that opens a VISA session on a COM port.
    But I also have a User Interface VI that needs to communicate with the device on same COM port.
    Is this possible?  Can I use a Shared Variable to keep the VISA Resource name and have multiple users (one at a time) communicate with the device?

    LabVIEW semaphores and all other LabVIEW objects like queues, notifiers, events, etc are not only process local objects only but even application context local only. While this makes no difference for built applications it is important inside the development environment as each LabVIEW project lives in its own application context (and tools started from the Tools menu run in yet another context). To do what you want to do, you need to implement some form of interapplication communication as Mark already mentioned. Or you can access named OS semaphores by calling OS APIs.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How can I write to multiple daisy-chained network serial addresses through a single COM port?

    I have a VI to write to 3 PI Mercury motor controllers using daisy chained RS232 connected via a Prolific USB-to-Serial adapter. I know that it is possible to talk to the individual controllers because the PI terminal that I have recognises the addresses of multiple controllers and designates them Device 1,2,3. The VISA resource name when configuring the port just comes up as COM5 most of time, with seemingly no way to specify an address on that COM port. Occasionally the VISA resource is ASRL5::INSTR and as this is disconnected and re-connected, this address moves up a number (e.g ASRL7::INSTR). Can anybody tell me how I can configure my serial communication to allow me to individually communicate with the different devices through a single COM port?

    What does the manual say about addressing? RS-232 is not multidrop, the resource name is correct, and there is no additional configuration needed. There would have be a specific write in order to address a certain controller.

  • How to use shared variables to address multiple Watlow controller​s on the same COM port

    Hello,
    I am trying to use LabVIEW 2010 to control 4 Watlow temperature controllers on one COM port. 3 are Model 96 and 1 is an EZ zone controller. Each controller has a unique modbus address, and I am trying to read from and write to individual registers (such as closed loop setpoint) using shared variables. I am getting return data when reading (although the data appears to be invalid), but am unable to change the value in the register by writing. How can I be sure that the Modbus server is sending commands to the correct controller?
    Chuck
    Solved!
    Go to Solution.

    Peter,
    Thanks for the reply. I have actually solved that problem. I realized that the Modbus server address has to be the same as the controller's Modbus address.
    I have, however, run into another problem. Perhaps you could help me with that. I have a system with 4 Watlow controllers, 3 are series 96 controllers, one is PID only and 2 are ramping. The 4th controller is an EZ zone. I am using RS485 for communications and the controllers are all wired in parallel for communications and power.
    I have set up 2 Modbus servers for 2 of the controllers.
    This is the first I have ever worked with Modbus based communications. I have successfully programmed using the Modbus read/write VIs, and am wanting to move to shared variables. My questions right now revolve around addressing, Modbus I/O servers and COM ports. Specifically, at this point, I know the addresses need to match up between the server and the slave device (Watlow controller in my case), how many servers can I create and use on one COM port? If the number is limited, is there a way I can specify an address that I want the server to talk to? Will the broadcast mode work to request data values from the controllers?
    I'd appreciate any information you can help me with, or if you could point me to some sort of concise 'How-To' for Modbus communication.
    Thanks.
    Chuck

  • GPS Error on F3507g & Windows 7 "The GPS NMEA COM Port is not available" x200

    I have an X200 with a WWAN Card 43R153 (Ericsson F3507g) running Window 7.
    The WWAN reliably connects to Vodafone but I can't get the GPS to work.
    Device manager shows this port Enabled:-
    Ericsson E3507G Mobile Broadband MiniCard GPS Port (Com8)
    Driver Invogps.sys from Ericsson AB, Version 1.0.0.28  29/09/2008.
    Thinkvantage GPS version 2.50 is also installed and Lenovo System Update says everything is up to date.
    When I "Turn on GPS" or run 'Lenovs GPS"  I get this message:-
    The GPS NMEA COM port is not available. You need to check the following things.
    - Another GPS application is using the COM port.
    - COM ports is disabled. You can enable the COM port in the Device Manager.
    Location and Other Sensors shows nothing installed.
    I've tried deleting all the drivers and reinstalling but not luck.
    Has anyone else had the same problem and found a solution. I can't think of anything else to try.
    ThinkPad X200 7459-1P0

    If you are running a Windows 7 Weather Gadget on your desktop, try shutting it down entirely and see if that changes your GPS "in use" problem.
    Cheers,
    Bill
    I don't work for Lenovo

  • How to change audio port output to input port on mac os x 10.9.2 to connect electric guitar on macbook pro for garageband

    How to change audio port from output to input port so that i can connect my electric guitar to play along with garageband. I couldn't the option to change it in my system preferences of sound as my mac os x is 10.9.2. So please help me!!!!!!!!!!!! I want to play electric guitar with my garageband so badly!!! :O
    Mac os x 10.9.2. ; Garageband 10.0.2

    There is no audio line input on your Mac, get a USB interface, get one that is specified for guitars.

  • HyperTerminal sees a COM port but VISA does not

    It should not be possible that HyperTerminal sees a COM port but VISA does not. Does anyone know why or have any ideas?
    Here's some more info: I wrote a LabView (LV) program and deployed it (via the Application Builder) to some of our production department's PCs (some Windows XP and some Windows 7). We use it to set up products we design and manufacture through our device's USB serial port. The USB port is actually a virtual COM port (VCP) - a USB to Serial converter or "bridge". We have a custom driver for our device and since each device's USB bridge chip is programmed with a different serial number, every time we connect a new device to the PC the installer runs and assigns a new COM port number. This is so our customers can use multiple devices on a PC. Fine. On one of our production PC's we were close to  COM900 ports (HyperTerminal sees only up to COM256) when suddenly Win7 would not allow any more. We were able to uninstall orphaned (non-present) COM ports from DeviceManager ("DM") by starting it from a command console (DOS window) with a special command-line switch, "set devmgr_show_nonpresent_devices=1" then "start devmgmt.msc" (I have this in a batch file). In DM View menu you can "Show hidden devices" and uninstall them as if they were connected. I've also tried uninstalling them the normal way when the device was actually connected. Either way, sometimes, not always, depending on the COM port number, after reusing that port number by installing a new device which picks up that old, freed-up number, LV VISA doesn't see it. In other words, when "Refresh" is clicked in the COM port VISA list box, any new devices installed should be and normally are seen. (Refresh is not needed if the application is started after the device's driver is installed. It is only need if the LV application is open with the new device is added.) However, HyperTerminal does see it and lists it in the Properties screen, the "Connect using..." list box. And the port works with HyperTerminal. (Of course we've tried rebooting after uninstalling and/or reinstalling the device, with the same results.)
    When I've spoken to the NI Applications Engineers in the past about serial port issues (not about this problem) they have confirmed that if HyperTerminal can see the port then NI VISA should also see it. This is crazy. I am posting this in hope that someone can shed some light on this problem.
    Thank you. -Ed

    Good catch. Yes, we're using the Silicon Labs CP2102 and have created a "custom driver" installation package. Our new PCBs have a factory-programmed chip, so the PC reuses that COM port (COM3 on that PC). The problem is when we we re-program the CP2102 (setIDs exe) with our PID, and device strings (including the S/N), the PC runs our installer and assigns the next COM port number. I was hoping that maybe it would go up to 64K or something! Anyway, it surpassed COM256 but we ran into this problem when almost up to COM900.)
    There is a registry entry for each SN device, which shows the assigned port. If we delete the key with regedit, the COM port database (don't know the file name) still has the port number. That's where Device Manager comes in. It seems to allow us to manually delete the ports, but it would take quite a while to delete 900. (I was trying to make a batch file for DevCon, but couldn't get it to see the HW ID of the devices in need of deletion.) So we tried manually deleting a few. After doing that Device Manager shows that Windows (and HyperTerminal) can reuse the port number when a new device (new SN) is installed, but, as you know from this post, VISA cannot see unless I manually add it in MAX.
    I can't see how it has anything to do with the Silicon Labs driver. I might have to delete ALL of MY devices, then uninstall the driver files, reboot, then reinstall, as you suggested with the SiLabs driver. However, I don't see how VISA will now see these changes. VISA must have it's own database. That's what I thought deleting the ports in MAX would clear out, like a fresh install, but apparently not.
    I've been through Silicon Labs' tech support on other issues and they've been able to help on some. I could run this by them.
    BTW, have you noticed that Silicon Labs' chip and driver, while faster than NI's own "bridge" or serial-USB converter (I returned it because at $100 it's performance was worse than a $20 converter you can buy in Staples), is substantially slower than a real serial port? For example, our device can transmit 250 readings per second (a 12 byte string). A real serial port used with my LabView program can keep up, i.e.., graph & tabulate at that rate, but with a VCP we only get about 70 RPS. Same code. Can't figure this one out. They say the've tested the driver to 900 KB claimed. We're using 115KB here. Anyway, the VCP driver makes it look like a COM port which LV thinks it is. Why is it slower than a real port when the USB should be able to work almost 10 times faster than I'm using it (up to 1024 bytes per mSec per the full-speed USB spec, which SiLabs claims they verified)?
    Anyway, I appreciate your help. Thanks! -Ed

Maybe you are looking for

  • Printing with HP Deskjet printer

    I have a HP Deskjet 812C printer, and I have connected it to my brand new MacBook. Everytime I try to print a document, it comes out with half of each line printed then shoots out about five extra pages with a little bit of printing on them. This pri

  • External Hard Drive Fails to Mount

    I have a 1TB external hard drive disk2 below, that fails to mount. I have run Utilities/Disk Utility and completed first aid successfully (verifying and repairing) but I am still unable to Mount the drive. I have also tried mounting the drive from th

  • Time_out Dump on this query take too long time

    hi experts, in my report a query taking too long time pl. provide performance tips or suggestions select mkpf~mblnr  mkpf~mjahr  mkpf~usnam  mkpf~vgart            mkpf~xabln  mkpf~xblnr  mkpf~zshift mkpf~frbnr            mkpf~bktxt  mkpf~bldat  mkpf~

  • Where to upload images on-line for storyboarding?

    Where to upload images on-line for storyboarding? Or what does it take to produce a storyboard from a Adobe Story Plus Script? Any suggestions are welcome ; )

  • Business Object Repository (BOR) in CAF

    Hi, The Business Object Repository (BOR) is the object-oriented repository in the R/3 System. It contains the SAP business object types and SAP interface types as well as their components, such as methods, attributes and events. Is there something si