Getting data through com port

how can i understand that data is sent tome through a com port.
i use dataavailable event but when i read the data iread just meanless codes and it can not be.
i use javax.comm for my project..

Hi
You Must have a listener for your comm port e.g
private class CommListener implements SerialPortEventListener{
case SerialPortEvent.DATA_AVAILABLE:{
while(true){
try{
ch = is.read();
if(ch==-1)
break;
buf.append((char)ch);
}catch(IOException ioe){
System.out.println(buf.toString());
}

Similar Messages

  • How do I get LabVIEW to recognise a Gaussmeter as a device through COM port 1?

    Hello everyone.
    I am trying to do display the readings from a GM05 Gaussmeter in LabVIEW through COM Port 1 on my computer.  I have installed the relevant drivers and MAX recognises that something is plugged in by listing COM 1, COM 2 and LPT 1 under devices, but it does not recognise the Gaussmeter as a device (it does not say 'device #' in brackets next to COM 1)..  Therefore when I come to create a new Virtual Channel in the Data Neighbourhood I cannot select my COM port as a device.  Can anyone help me to solve this problem, any advice would be greatly appreciated.
    Regards,
    Rob.

    Unlike GPIB the com port or serial communication usually does not have an identify query, so it wont auto recognize the device.  You should look in the manual of the device and send an appropriate string (there might be a self-test or identify string) and check for the correct response.  Not all devices communicate both ways (some are talkers, some are listeners and many are both).
    Paul
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • JMF getting data from tcp port

    Hi there is any way that i can get data from tcp port uisng datasourece
    mean i create a server port which accept the connection after established the connection then the client send audio data to the server, the server only will get that data in a buffer and using jmf datasource i should read that data and might send it to another machine using avtransmitter but i dont know how to wrape that data in rtp
    private void Streamforward()
    ServerSocket echoServer = null;
    byte[] buffer=new byte[8192];
    DataInputStream is;
    PrintStream os;
    Socket clientSocket = null;
    // Try to open a server socket on port 4444
    // Note that we can't choose a port less than 1023 if we are not
    // privileged users (root)
    try {
    echoServer = new ServerSocket(4444);
    catch (IOException e) {
    System.out.println(e);
    // Create a socket object from the ServerSocket to listen and accept
    // connections.
    // Open input and output streams
    try {
    clientSocket = echoServer.accept();
    Convert con=new Convert();
    is = new DataInputStream(clientSocket.getInputStream());
    os = new PrintStream(clientSocket.getOutputStream());
    int start=0;
    while (true)
    int length=clientSocket.getReceiveBufferSize();
    System.out.println(length);
    //line=in.readLine();
    is.read(buffer,0,length);
    //here we should put that data into datasourece
    catch (IOException e) {
    System.out.println(e);
    it would be too help full i have to submitt my project soon and i dont know what to do:( with this data ....i am integratting skype with jmf

    I've been looking around for the same solution for my client (who using Mettler Toledo's (MT) products). Anyone did this please kindly share your experience, thanks.
    My initial approach was to write a Java middle-ware to read from the real-time system and upload into JDE from there.
    I wonder if MT stored the weighing data somewhere in some database ...
    Any other hardware vendor out there to make our life easier?
    Additional:
    Just got a way that might work, use Java or JNI to read from Serial port (RS-232) or USB, then proceed from there (provided your hardware with that communication protocol).
    Cheers,
    Avatar Ng
    Edited by: user2367131 on Aug 18, 2009 6:34 AM

  • Dowloading data through client port

    Heloo my name is Mruthyunjaya.
    We are new to java client side programming.We have a problem and the problem is :
    Our systems are connected in LAN i am running my jboss server in my system.
    and accessing the pages from my system. all pages are running successfully but the problem comes when i am trying to run some programs
    which involve downloading data into my device like spot billing machine.
    how can i let my java porgram to identify my client port when i am running server on other system
    Jboss server is running on other system and device is connected to some other system in lan and it is trying to download the data through that server irrespective of the port to which it is connected.

    Hello
    We are new to java client side programming.We have a problem and the problem is :
    Our systems are connected in LAN i am running my jboss server in my system.
    and accessing the pages from my system. all pages are running successfully but the problem comes when i am trying to run some programs
    which involve downloading data into my device like spot billing machine. and those programs use commapi for getting that data.
    how can i let my java porgram which uses a third party api to identify my client port when i am running server on other system
    Jboss server is running on other system and device is connected to some other system in lan and it is trying to download the data through that server irrespective of the port to which it is connected.

  • How to collect data and store data through printer port usind Dev'6i

    Hi,
    When we make a phone call through a PABX machine, the PABX machine print the call's detail if it is connect to printer. Let us assume, the PABX machine is connected via the printer cable with a PC at it's printer port. Now, the data sending by the PABX machine is reaching to PC's printer port, I would like to collect those data and store in a file(of any format) using Developer 6i. Is that possible? If yes, then how? Do I need to use any ActiveX control? Or is there any other way?
    Please Help me out. Thanks in advance.
    Bivash

    Dear Friends
    I also need a solution to this problem. But it may require sequance / format of information being sent by weigh bridge to the COM port. Normally the W/b company has their own format of information. We might have to change the COMP port speed also .e.g 9600 BPS, 2400 BPS etc.
    Rajan

  • GPS or MNEA data into com port

    I need to get GPS data into the com port and merge with DAQ analog data for logging. Any suggestuions?

    LabVIEW would work well for that. You could do it with LabVIEW by using serial communication and DAQ, which there are lots of examples for both. You posted this in the Datalogging and Supervisory Control area which is an add-on module to LabVIEW. It gives you lots of features which you may or may not need for this application. For instance, with the DSC module you could have the data automatically log to a database that is ODBC compliant and incorporate security features. Without the module you would have to write the information to file programmatically. You might do some research on www.ni.com to get more information on DSC to see if it is a good fit for you application.
    Regards,
    JR A.
    Application Engineer
    National Instruments

  • How to get data from serial port to GUI textArea

    From Serial Port.....
    Messages from base (always 5 bytes):
    0xAA, 0, 0, 0, 0xBB - IDLE Mode
    0xAA, 0, 0x80, 0x80, 0xBB - Question Mode
    messages from terminal (always 6 bytes):
    0xAA, a, b, c, chksum, 0xBB
    where chksum = a+b+c;
    a = address (0-250)
    the 2 MSB's of b represenet the answer:
    0 0 - A
    0 1 - B
    1 0 - C
    1 1 - D
    the 6LSB's of b and 8bits of c is the time for answer, in milliseconds.
    (0-16384 milliseconds)
    I have VB Code for that but I want the same thing in Java ...
    Can any one help me?
    Here's VB Code..
    VERSION 5.00
    Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
    Begin VB.Form Form1
       BorderStyle     =   1  'Fixed Single
       Caption         =   "Aakar GUI"
       ClientHeight    =   4665
       ClientLeft      =   60
       ClientTop       =   375
       ClientWidth     =   6105
       LinkTopic       =   "Form1"
       MaxButton       =   0   'False
       MinButton       =   0   'False
       ScaleHeight     =   311
       ScaleMode       =   3  'Pixel
       ScaleWidth      =   407
       StartUpPosition =   3  'Windows Default
       Begin VB.CommandButton cmdPort
          Caption         =   "Open Port"
          Height          =   375
          Left            =   120
          TabIndex        =   4
          Top             =   600
          Width           =   1455
       End
       Begin VB.ComboBox cmbPort
          Height          =   315
          ItemData        =   "Form1.frx":0000
          Left            =   120
          List            =   "Form1.frx":0016
          Style           =   2  'Dropdown List
          TabIndex        =   3
          Top             =   120
          Width           =   2895
       End
       Begin VB.CommandButton cmdEnd
          Caption         =   "End"
          Height          =   495
          Left            =   1560
          TabIndex        =   2
          Top             =   1320
          Width           =   1215
       End
       Begin VB.CommandButton cmdStart
          Caption         =   "Start"
          Height          =   495
          Left            =   120
          TabIndex        =   1
          Top             =   1320
          Width           =   1215
       End
       Begin VB.TextBox txtMessage
          Height          =   2040
          Left            =   119
          MultiLine       =   -1  'True
          ScrollBars      =   3  'Both
          TabIndex        =   0
          Top             =   2475
          Width           =   5848
       End
       Begin VB.Timer tmrRead
          Enabled         =   0   'False
          Interval        =   1
          Left            =   2040
          Top             =   600
       End
       Begin MSCommLib.MSComm MSComm1
          Left            =   3120
          Top             =   360
          _ExtentX        =   1164
          _ExtentY        =   1164
          _Version        =   393216
          DTREnable       =   0   'False
          ParityReplace   =   45
          SThreshold      =   1
       End
       Begin VB.Label Label5
          Caption         =   "Result Data:"
          Height          =   375
          Left            =   120
          TabIndex        =   5
          Top             =   2115
          Width           =   1320
       End
    End
    Attribute VB_Name = "Form1"
    Attribute VB_GlobalNameSpace = False
    Attribute VB_Creatable = False
    Attribute VB_PredeclaredId = True
    Attribute VB_Exposed = False
    Option Explicit
    Dim PortIsOpen As Boolean
    Dim Answers(4) As String
    Dim RejectKeystroke As Boolean
    Private Sub cmbPort_Change()
    Debug.Print cmbPort.ListIndex
    End Sub
    Private Sub cmbPort_Validate(Cancel As Boolean)
    'Cancel = True
    End Sub
    Private Sub cmdEnd_Click()
    MSComm1.Output = "e"
    txtMessage.Text = ""
    End Sub
    Private Sub cmdPort_Click()
    On Error GoTo ErrorHandler
    If cmbPort.ListIndex < 0 Then Exit Sub
    If PortIsOpen Then
        cmbPort.Enabled = True
        MSComm1.PortOpen = False
        PortIsOpen = False
        cmdPort.Caption = "Open Port"
        cmdStart.Enabled = False
        cmdEnd.Enabled = False
    Else
        MSComm1.CommPort = cmbPort.ListIndex + 1
        cmbPort.Enabled = False
        MSComm1.PortOpen = True
        PortIsOpen = True
        cmdPort.Caption = "Close Port"
        cmdStart.Enabled = True
        cmdEnd.Enabled = True
    End If
    Exit Sub
    ErrorHandler:
    Debug.Print Err.Number
    Debug.Print Err.Description
    MsgBox Err.Description, vbExclamation Or vbOKOnly, "Error opening port"
    cmbPort.Enabled = True
    PortIsOpen = False
    cmdPort.Caption = "Open Port"
    cmdStart.Enabled = False
    cmdEnd.Enabled = False
    End Sub
    Private Sub cmdStart_Click()
    MSComm1.Output = "s"
    txtMessage.Text = ""
    End Sub
    Private Sub Form_Initialize()
    Dim tmp As Variant
    tmp = InitCommonControls
    End Sub
    Private Sub Form_Load()
    Answers(0) = "A"
    Answers(1) = "B"
    Answers(2) = "C"
    Answers(3) = "D"
    'MSComm1.Settings = "9600,n,8,1"
    ''MSComm1.Settings = "115200,n,8,1"
    'MSComm1.PortOpen = True
    On Error GoTo ErrorHandler1
    MSComm1.CommPort = 1                    ' comm port 1
    MSComm1.RThreshold = 1                  ' use 'on comm' event processing
    MSComm1.Settings = "9600,n,8,1"         ' baud, parity, data bits, stop bits
    MSComm1.SThreshold = 1                  ' allows us to track Tx LED
    MSComm1.InputMode = comInputModeText    'comInputModeBinary  ' binary mode, you can also use
                                            ' comInputModeText for text only use
    PortIsOpen = False
    cmbPort.ListIndex = 0
    ' open the port
    MSComm1.PortOpen = True
    cmbPort.Enabled = False
    PortIsOpen = True
    cmdPort.Caption = "Close Port"
    cmdStart.Enabled = True
    cmdEnd.Enabled = True
    Exit Sub
    ErrorHandler1:
    Debug.Print Err.Description
    PortIsOpen = False
    cmbPort.Enabled = True
    cmdPort.Caption = "Open Port"
    cmdStart.Enabled = False
    cmdEnd.Enabled = False
    End Sub
    Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
    If MSComm1.PortOpen Then MSComm1.PortOpen = False
    End Sub
    Private Sub lblOption_Click()
    End Sub
    Private Sub MSComm1_OnComm()
    ' Synopsis:     Handle incoming characters, 'On Comm' Event
    ' Description:  By setting MSComm1.RThreshold = 1, this event will fire for
    '               each character that arrives in the comm controls input buffer.
    '               Set MSComm1.RThreshold = 0 if you want to poll the control
    '               yourself, either via a TImer or within program execution loop.
    '               In most cases, OnComm Event processing shown here is the prefered
    '               method of processing incoming characters.
        Dim i As Long
        Dim sBuff    As String           ' buffer for holding incoming characters
        Const MTC       As String = vbCrLf  ' message terminator characters (ususally vbCrLf)
        Const LenMTC    As Long = 2         ' number of terminator characters, must match MTC
        Dim iPtr        As Long             ' pointer to terminatior character
        ' OnComm fires for multiple Events
        ' so get the Event ID & process
        Select Case MSComm1.CommEvent
            ' Received RThreshold # of chars, in our case 1.
            Case comEvReceive
                ' read all of the characters from the input buffer
                ' StrConv() is required when using MSComm in binary mode,
                ' if you set MSComm1.InputMode = comInputModeText, it's not required
                'sBuff = sBuff & StrConv(MSComm1.Input, vbUnicode)
                'If Len(txtMessage.Text) > 4096 Then txtMessage.Text = ""
                sBuff = MSComm1.Input
                Dim ch As String
                Dim PacketStart As Boolean
                Dim PacketLength As Integer
                Dim Packet() As String
                PacketStart = False
                PacketLength = 0
                While (Len(sBuff) > 0)
                    ch = Left(sBuff, 1)
                    If (ch = Chr(&HAA)) Then PacketStart = True
                    If (ch = Chr(&HBB)) Then PacketStart = False
                    If (ch <> Chr(&HAA) And ch <> Chr(&HBB)) Then
                        PacketLength = PacketLength + 1
                        ReDim Preserve Packet(PacketLength)
                        Packet(PacketLength) = ch
                    End If
                    'txtMessage.Text = txtMessage.Text + Format(Hex(Asc(ch)), " @@")
                    sBuff = Right(sBuff, Len(sBuff) - 1)
                Wend
                If (PacketLength = 3) Then
                    Debug.Print "Command packet recieved"
                    'txtMessage.Text = txtMessage.Text + vbCrLf + "Address =" + Str(Asc(Packet(1)))
                    'txtMessage.Text = txtMessage.Text + vbCrLf + "Address =" + Str(Asc(Packet(2)))
                End If
                If (PacketLength = 4) Then
                    Debug.Print "Response packet recieved"
                    txtMessage.Text = txtMessage.Text + "Address =" + Str(Asc(Packet(1))) + _
                        " Answer = " + Answers((Asc(Packet(2)) And &HC0) / 64) + _
                        " Time =" + Str((Asc(Packet(2)) And &H3F) * 256 + (Asc(Packet(3)))) + "mS" + vbCrLf
                    'txtMessage.Text = txtMessage.Text + vbCrLf + "Address =" + Str(Asc(Packet(1)))
                    'txtMessage.Text = txtMessage.Text + vbCrLf + "Option =" + Str((Asc(Packet(2)) And &HC0) / 64)
                    'txtMessage.Text = txtMessage.Text + vbCrLf + "Time =" + Str((Asc(Packet(2)) And &H3F) * 256 + (Asc(Packet(3))))
                End If
                If (PacketLength <> 4 And PacketLength <> 3) Then Debug.Print "Unknown packet of length" + Str(PacketLength) + " recieved"
                txtMessage.Text = txtMessage.Text + vbCrLf
            ' An EOF charater was found in the input stream
            Case comEvEOF
                DoEvents
            ' There are SThreshold number of characters in the transmit  buffer.
            Case comEvSend
                DoEvents
            ' A Break was received.
            Case comEventBreak
                DoEvents
            ' Framing Error
            Case comEventFrame
                DoEvents
            ' Data Lost.
            Case comEventOverrun
                DoEvents
            ' Receive buffer overflow.
            Case comEventRxOver
                DoEvents
            ' Parity Error.
            Case comEventRxParity
                DoEvents
            ' Transmit buffer full.
            Case comEventTxFull
            ' Unexpected error retrieving DCB]
            Case comEventDCB
                DoEvents
        End Select
    End Sub
    Private Sub tmrRead_Timer()
    'MSComm1.Output = vbCrLf + vbCrLf
    'MSComm1.Output = Chr(128)
    End Sub
    Private Sub txtMessage_KeyDown(KeyCode As Integer, Shift As Integer)
    If Shift = 2 Or Shift = 4 Then RejectKeystroke = False Else RejectKeystroke = True
    End Sub
    Private Sub txtMessage_KeyPress(KeyAscii As Integer)
    If RejectKeystroke Then
        KeyAscii = 0
    End If
    End SubThanks in advance..

    I want to replicate the entire VB program as Java Program.
    This has to be included in my project which i am doing in java.

  • Regarding getting data through network...

    Hi All,
    The program code I have given below is hanging and not even raising any exception, not even timeout, why I could not understand. Please Help...
    Example URL: http://www.mymortgagepros.com
    Please try this code on this URL, I am getting problem on this URL, Some Urls whereas are working perfect...
    public String getBufferedData(String str) {
    URL url = null;
    String line = null, body = null;
    InputStreamReader in = null;
    BufferedReader buffer = null;
    URLConnection myConn = null;
    StringBuffer sb1 = new StringBuffer("");
    try {
         url = new URL(str);
         myConn = (HttpURLConnection)url.openConnection();
         myConn.setRequestProperty("User-agent","");
         buffer = new BufferedReader(new InputStreamReader(myConn.getInputStream()));//*****
         while ((line = buffer.readLine()) != null) {
         System.out.println("We are here3 in loop...");
         sb1.append(line);
         buffer.close();
         body = new String(sb1);
    }catch(MalformedURLException mx) {
         System.out.println("MalformedURLException ");
         System.out.println(mx.getMessage());
    }catch(IOException ix) {
         System.out.println("IOException ");
         System.out.println(ix.getMessage());
    }catch(Exception ex) {
         System.out.println("Exception ");
         System.out.println(ex.getMessage());
    }finally {
         try {
         if(myConn != null)     myConn = null;
         }catch(Exception e) {
    System.out.println("Exception in Finally");
    System.out.println(e.getMessage());}
    return body;
    Thanks in advance...
    Srinivas P.

    Hi
    You Must have a listener for your comm port e.g
    private class CommListener implements SerialPortEventListener{
    case SerialPortEvent.DATA_AVAILABLE:{
    while(true){
    try{
    ch = is.read();
    if(ch==-1)
    break;
    buf.append((char)ch);
    }catch(IOException ioe){
    System.out.println(buf.toString());
    }

  • Please::Getting Data Through Setting Focus On Row in ADFReadOnly Table ? ??

    Hi All ;
    By clicking on tableSelectOne on Row in ADFReadOnly I can Get All of the rest of the Row Data in inputtexts ;
    I want To Do The Same Action not By clicking on tableSelectOne but by clicking on any Cell On This Row , Can any body help by example ??
    Regards;

    Abu,
    here's a website full of such hints
    http://www.oracle.com/technology/jsf/index.html
    your usecase is
    http://vgoldin.blogspot.com/2007/01/Weing-aftableselectone-by-clicking.html
    Frank

  • URGENT: Capturing data through serial port

    Hi,
    My problem is with the use of javax.comm API. I have an RFID tag reader connected to
    the serial port. It is a handheld reader and reads tags when its trigger is pulled. The
    data that is read is sent to the serial port. This is what I want to capture.
    I tried to test the reading operation by running the SimpleRead sample. What I see is
    that I pull the trigger once to read 1 tag, but that generates 3 DATA_AVAILABLE events.
    The tag ID that is read is 16 bytes, preceded by a 3 byte AIM Identifier (that declares
    the following data was read from an RFID tag, and not a barcode which has different
    AIM Identifiers for the different symbologies - but I digress.) By inserting some println's,
    I was able to see that the 19 bytes of data are read 8 bytes at a time. The first 8 bytes
    are read on the first DATA_AVAILABLE event, the next 8 are read on the second event
    and the last 3 bytes are read on the 3rd DATA_AVAILABLE event.
    This is strange & not good for me. How can my application know that the data read in
    these 3 separate DATA_AVAILABLE events is to be concatenated to form a single
    tag ID? Why is the single trigger-pull & tag read operation broken up into chunks of
    8 bytes? Is there some configuration setting that will give me the behavior I want?
    (I cannot rely on the length of the tag ID being 16 bytes always, because the same
    reader will also be reading barcodes where the data may have varying length)
    Thanks for any help. This is really urgent.
    - Ajoy

    please use the [ code ]and [code ] tags for code.
    I don't think you have a problem with the code, it's more like understanding how to make it work.
    to make the read method return.You do not have a read() method.
    The code is behaving as it should.
    You need to use the SimpleRead class as a thread, add and remove the Serial port listener as needed.
    You read all data available, then send it to a method to parse the buffer.
    You can count how much data was read so you know how much to parse.
    I never used receive threshhold.
    Here is example (sample)of my serial port reader
    //SerialIO
       public void serialEvent(SerialPortEvent event) {
            switch(event.getEventType()) {
                  case SerialPortEvent.OUTPUT_BUFFER_EMPTY:
                break;
            case SerialPortEvent.DATA_AVAILABLE:
                this.dataManager.readData();
    //DataManager
    public void readData() {
         String str;
         int     bytes = 0;
         long endTime, now;
         try {
              while (this.owner.isComPortOpen
                   && (SerialIO.inStream.available() > 0)) {
                   bytes = SerilIO.inStream.read(this.buffer);
                   if (bytes > 0) {
                   if (bytes > this.buffer.length) {
                        System.out.println( ": Input buffer overflow!");
         **Here is where you parse your buffer
                   sendDataToParser(bytes, buffer);
              } catch (IOException ex) {
                   System.out.println( ": Cannot read input stream");
          * Stops the serialEvent listener
         protected void stopSerialEvent() {
              SerialIO.serialPort.removeEventListener();
              try {
                   Thread.sleep(2000);
                   flushInputStream();
              } catch (InterruptedException e1) {
                   // TODO Auto-generated catch block
                   e1.printStackTrace();
          * Starts the Serial event listener
         protected void startSerialEvent() {
              // TODO Auto-generated method stub
              try {
                   SerialIO.serialPort.addEventListener(SerialIO);
              } catch (TooManyListenersException e) {
                   // TODO Auto-generated catch block
                   //System.out.println("startSerialEvent in dataManager");
                   e.printStackTrace();

  • Filter and sorting on table when getting data through store proc

    Hi All,
    I am using JDeveloper 11g and trying to implement a table which gets its data from a result set returned by a store procedure. The store procedure is using joins to fetch data from multiple oracle tables. I am able to display the data by binding result set element to each columns of ADF table, but sorting and filtering is not working on this, I have checked the chek box while creating table to make it sortable and filtering.
    Please help on this issue. How can we implement filtering and sorting in this case?
    Thanks in advance
    Saurabh agarwal

    Hi,
    I use managed bean directly to access data. My back end returns me a map with the values and these values are then mapped to columns.
    Can you please suggest me any link or example where this model supporting filter is used.
    Thanks
    Saurabh

  • Get data through query all non validated invoices and unaccounted invoices

    Hi expert,
    I could not find flag in ap_invoices_all to find such invoice which are not accounted yet or such invoices which are not validated.
    please tell me column name used for both condition or give me query to find such records.
    Thanks

    Hi,
    If it's 11i, you can do this by linking with ap_invoice_distribution table . Checking match_staus_flag for validation and accounting date for accounted invoices ..
    Regards
    Muthu

  • Sending Hex message through COM port

    Hello
    I am trying to send the following Hex message using the javax.comm API. The message is
    02H 00H 00H 00H 00H 02H
    Any help regarding this would be greatly appreciated.
    Thank you

    Sure, what's your problem?Hello
    Thank you for the reply. I am using the getBytes() function and sending the string as the argument which was initialized to "02H 00H 00H 00H 00H 02H". First of all, I am not sure whether I should have the H's in the string and secondly, I am testing the program by reading this message from a program called SECSIM, which will read the actual bytes of the message, so for the above string, it is giving the
    Hex values considering these string elements ASCII chars. For example
    for 02H
    it gives 303248, where 30 is the Hex value for the char 0, 32 for 2 and 48 for H, which does not sound correct. I want this Hex message to be sent as hex instead of ASCII.
    If there are suggestions, it will be a great help. eventually I need to run this application from Windows XP to control a VT45 projector.
    Thank you
    Vinatha

  • NOT GETTING SAME COM PORT FOR MY APPLICATIO​N

    i am making an application to connect my PC serially to a microcontroller serially with a usb to RS232 cable. how should i code in my application to ensure that my serial connection always gets the same com port whenever the applivcation is running on an other PC?  it is important to get the same com port on every machine every time else my labview coding for serial communication will fail. OR is there a better to do this. Can we code in labview so that it uses any  free com port available on the PC? the user of the application must not be prompted to enter a free com port.
    thanks for any help.
    Attachments:
    Untitled.png ‏32 KB

    No need to shout or ring my PM box... We are all volunteers here and sometimes we sleep or eat.  besides its a rather simple problem that a search on the forums would have gotten you here
    My Tag cloud would have gotten you the this same example snippet :RenameAlias
    Just use the system API to find all available serial devices.  figure out which one is your uC (how depends on the connected device) and set the MAX Alias to "MyMicroController" or something meaningful 
    Jeff

  • Problem in reading data from serial port continuously- application hangs after sometimes

    I need to read data from two COM port and order of data appearance from COM port is not fixed. 
    I have used small timeout and reading data in while loop continously . If my application is steady for sometime it gets hangs and afterwards it doesnt receive any data again. 
    Then I need to restart my application again to make it work.
    I am attaching VI. Let me know any issue.
    Kudos are always welcome if you got solution to some extent.
    I need my difficulties because they are necessary to enjoy my success.
    --Ranjeet
    Attachments:
    Scanning.vi ‏39 KB

    billko wrote:
    Ranjeet_Singh wrote:
    I need to read data from two COM port and order of data appearance from COM port is not fixed. 
    I have used small timeout and reading data in while loop continously . If my application is steady for sometime it gets hangs and afterwards it doesnt receive any data again. 
    Then I need to restart my application again to make it work.
    I am attaching VI. Let me know any issue.
    What do you mean, "not fixed?"  If there is no termination character, no start/stop character(s) or even a consistent data length, then how can you really be sure when the data starts and stops?
    I probably misunderstood you though.  Assuming the last case is not ture - there is a certain length to the data - then you should use the bytes at port, like in the otherwise disastrous serial port read example.  In this case, it's NOT disastrous.  You have to make sure that you read all the data that came through.  Right now you have no idea how much data you just read.  Also, if this is streaming data, you might want to break it out into a producer/consumer design pattern.
    Not fixed means order is not fixed, data from any com port can come anytime. lenght is fixed, one com port have 14 byte and other 8 byte fixed..
    Reading data is not an issue for me as it works nice but I have a query that why my application hangs after sometime and stops reading data from COM PORT.
    Kudos are always welcome if you got solution to some extent.
    I need my difficulties because they are necessary to enjoy my success.
    --Ranjeet

Maybe you are looking for

  • Issues with Adobe and Windows 8

    I'm trying to use Creative Cloud's free trial run, but I have come up against a HUGE issue. For the last four weeks, I have tried in vain to get CS6 to install on my computer. I have a Dell Laptop with Windows 8 (which I am already quite disliking),

  • Why can't I edit or delete Address Book "On My Mac" or sync with iCloud?

    Why can't I edit or delete Address Book cards on my Macs, now that I've migrated to iCloud?  I can edit/delete if I go to iCloud, but the changes don't sync with my Macs.  What's happening, and what's a solution?  Just wait for Apple to fix a bug?

  • Streaming mac content to ipad

    Hi I've spent time searching for a simple solution but so far all I have found is apple tv. I was hoping to avoid shelling out another £100. I want to stream content from my mac o my iPad 2 while in my house over my home wifi network. I'd also like t

  • How to divide SMP Hybrid application in to modules?

    Hi Experts,       Is there any way to divide the SMP Hybrid Application into modules? like if i did login functionality, and one of my colleague did a attachment viewer functionality. Is it possible to integrate the two functionalities in single proj

  • CTS+ Configuration for Transporting non-ABAP objects in Portal Landscape using solution manage 7.1 sp8

    Hi, Currently we have cts+ already configured for our portal systems in our landscape through solution manager 7.0. Recently we had setup a new solution manager 7.1 and need to perform cts+ configuration using this new solution manager 7.1 as we are