Reading from COM port, in forms 6i.

Hi All,
Can anybody help me how to read COM port, capture from comport in forms 6i, we have weigh bridge system and they have supplies MS access bases application, i would like to use forms based own application instead that.
please anybody help me..
thanks in advance

[http://www.java2s.com/Code/Java/Development-Class/COM-Port.htm]

Similar Messages

  • How can i read an COM port ???

    Hi,
    somebody knows how can i read an COM port from Forms 4.5 ?
    Thanks in advance.
    Patricio

    Hi Patricio
    have U got any solutions?? Im also trying to send message to display panel from forms 5.
    If You got any please let me know itll help me a lot
    Thanx
    Suraj

  • How to connect com ports in forms 6i

    hi im creating a POS in Kuwait but i dunno how to connect the com port in forms 6i if any one know plz tell me

    Hi,
    .odb is openoffice.org database file or open source database file. Anybody has any knowledge on how to use Form 6i with this database file..

  • Efficient optimized way to read from serial port and GPS data display using map

    Hi,
    I have a custom h/w which reads the data from GPS Rx and after parsing send it to PC over RS232.
    Each second it sends 201 bytes to PC. I have developed a VI to read the GPS data and display it. Project file is attached.
    Fulctionality of different loops are as following:
    1. LOOP 1: 1.1 Reads the serial data from com port.
                   1.2 Synclonize the frame using start bytes "a" and "z".
                   1.3 Reads next 4 bytes containg receiving error information.
                   1.4 Reads next 195 bytes. in which initial 80 byes are GPS data. rest are others.
    2. LOOP 2: 2.1 Extarcts the GPS information and put them in an array.
                      2.2 Extarcts the receive error infor and counts the total error by incrimenting the variable using shift reg.
    3. LOOP 3:3: 3.1 Displays the GPS data in chart and log the data in a file.
    4. FLOW : Uses the GMAP .NET based API to creat a MAP and display.
    Problem statement:
    1. Functionality acheived.
    2. However in between data set is being missed by the programm. 
    Quesitions:
    1. Is the developed VI is efficient in terms of using queue loacl variables etc.
    2. What are the improvments I can do to solve the problem.
    Any other suggestions|
    Thank you
    jayant
    jayant
    Attachments:
    Telemetry_Receiver_v2.zip ‏3075 KB

    One of the most common problems in serial communication is the need for an adequate timing: how much time is expected your device to spend before answering? Have you put and adequate pause in your code before reading from the serial port?
    Hope this helps
    Roberto
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Plot more than one analog value to a waveform chart by reading from Serial Port

    I have 4 LDRs and I want to plot their values to a waveform chart by reading them from the serial port. I have looked around and found an example of a VI plotting one value to a waveform chart (attached below) but I am unsure about how to expand this for 4 different waveforms, mostly because I don't particularly understand the way is being read currently. If someone could either point me in the way of a relevant example or explain/show me a solution, or explain howthe current VI I have works, that would be greatly appreciated.
    Attachments:
    LDRread.vi ‏20 KB

    Since I assume each LDR (whatever that is) has its own serial connection, you will need to read from 4 different serial ports.  From there, just form an array of all the data and write to the chart.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions

  • Computer freezes while reading from serial port

    My computer freezes when i tried to read from a serial port for a longer period of time such as 10 hours. I always close the serial port after reading. please, help me solve this problem

    I too experienced a similar problem twice on my machine and I have no idea how to stop it because it is so intermittent and I cannot replicate it.
    Perhaps I can offer some clues.
    The Labview screen cannot be stopped and some parts of Windows appears frozen. Oddly enough I can switch to the block diagram but thats about all I can do. The LV stop button will indicate a mouse click on it but the VI does not stop. iT also cannot be closed.
    Even the reset button and power button on the PC does not work. I am forced to power down the PC (pull the plug) to get back control.
    I believe it is related to a visa call to my serial Balance.
    ANyway no solution but hopefully some clues.
    Dell Optiplex GX260 w/ 500MB RAM
    Win2K 500.2195 w service pak 4,
    NI
    serial Hardware and NI serial ver1.45 (16 com ports)
    Labview 6.1 and 7

  • Read from parallel port

    I know it's possible to write some data to the parallel port using
    LabVIEW, but I don'y know if it's possible to read from the parallel
    port.
    If someone knows, please advice.
    Thanx for reading.
    Paul
    Sent via Deja.com http://www.deja.com/
    Before you buy.

    [email protected] wrote:
    >I know it's possible to write some data to the parallel port using LabVIEW,
    but I don't know if it's possible to read from the parallel port. If someone
    knows, please advice.
    Thanx for reading.
    Paul
    Yes, it is very easy to read from the parallel port. There have even been
    some VIs floating around allowing you to use the parallel port for digital
    I/O using the inport and outport VIs.
    To just use it to communicate, just use the VISA VIs with the proper resource
    name for the port you are using.
    Bob Young - Test Engineer - Lapsed Certified LabVIEW Developer
    DISTek Integration, Inc. - NI Alliance Member
    mailto:[email protected]

  • Access COM Port through Forms 6i

    Dear all,
    How r u???
    I want to connect hardware (i.e. IR devices) with COM port. And want to access through Forms. I have done it before in .NET technology but at this time i want to do this in Oracle Forms.
    Kindly reply me for this.@ [email protected]
    thanks
    Muhammad Raheel Mannan

    If you have done it in .net you can make it as exe and implement webutil in forms.
    Call the .net exe using the webutil client host
    Rajesh ALex

  • A problem about reading from serial port

    Hi,
       I just sent '0x03' from MCU to PC continuously, and then sent  '/n' as a stop character after every '0x03'. I use labview to read the data. The problem is when it get two '03' it get a '0', another two '03' and another a '0'. I don't know where is the '0' from?
      PS: Hyper terminal can display natrually.
       Thank you! 
    帖子被hengfo在08-08-2007 10:14 PM时编辑过了
    Attachments:
    serial read.vi ‏36 KB

    I think the problem may be the loop reading the serial port is running too fast.  There is no timing delay in the loop, so you are reading it as fast as you can, and probably faster than the device is sending data.  So sometimes the buffer is empty, and then the empty string gets converted to a numeric zero.  The way to know for sure is to put an indicator on the error wire coming out of the serial port read.  I bet you will see errors about the read buffer being empty.
    Put a wait timer in the loop to slow down the execution just slightly.  This is a good idea so that LV doesn't eat up all the CPU resources.  Look at the example for Basic Serial Write and Read.  You may want to have a loop ahead of the read that waits until there are a certain number of bytes at the port before it reads the serial port.  You may want to put a loop around the serial port that waits until a valid number is read in before it exits the loop and goes to the numeric conversion.
    Message Edited by Ravens Fan on 08-09-2007 08:50 AM

  • How to read from the incoming payments form table

    Hi, Im writing an addon that will sum the selected documents for payment by document type (Invoice, Credit Memos, Payment on Account).  using UI how can I get and read from the table ? I can see that it is item 20. But dont know how to get to the data on secreen.
    Thank you!
    Jose.

    SAPbouiCOM.Matrix oMatrix = (SAPbouiCOM.Matrix)moPaymentForm.Items.Item("20").Specific;
    SAPbouiCOM.Column _oCheckColumn = _oMatrix.Columns.Item("10000127");
                        SAPbouiCOM.Column _oAmountColumn = _oMatrix.Columns.Item("24");
                        SAPbouiCOM.Column _oDocTypeColumn = _oMatrix.Columns.Item("45");
    bool bChecked = ((SAPbouiCOM.CheckBox)oCheckColumn.Cells.Item(1).Specific).Checked;

  • How to read a message from com port

    i have a gsm modem connect to my pc though a serial port
    how can i read the output from modem and use them in my java program
    many thanks....

    http://java.sun.com/products/javacomm/

  • Function for reading from serial port

    Hi experts,
    We are trying to read data from the serial port with the following function we got from internet.
    The problem is when creating the object with the sentence CREATE OBJECT o_obj '"MSCOMMLib.MSComm.1"'.
    This returns a sy-subrc = 2 and shows the exception NO_CREATE_OBJECT.
    We already copied the file MSCOMM32.OCX in c:\windows\system32 and we successfuly registered it, with regsvr32.exe.
    We tried it with Windows XP and Vista.
    Anybody has any idea?
    Thanks in advance
    FUNCTION ZSERIALCOM.
    ""Interfase local
    *"  IMPORTING
    *"     REFERENCE(MODE) TYPE  I DEFAULT 0
    *"     REFERENCE(COMMPORT) TYPE  I DEFAULT 1
    *"     REFERENCE(SETTINGS) TYPE  C DEFAULT '2400,N,8,1'
    *"     REFERENCE(OUTPUT) TYPE  C OPTIONAL
    *"  EXPORTING
    *"     REFERENCE(INPUT) TYPE  C
    *"  EXCEPTIONS
    *"      NO_CREATE_OBJECT
      TYPE-POOLS: sabc.
      INCLUDE ole2incl.
      PERFORM init.
      PERFORM open_port USING commport settings.
      IF mode = 0.
        PERFORM read_port
        CHANGING input.
      ENDIF.
      IF mode = 1.
        PERFORM write_port
        USING output
        CHANGING input.
      ENDIF.
      PERFORM final.
    ENDFUNCTION.
    DATA: o_obj TYPE ole2_object.
    *& Form Init
    text
    --> p1 text
    <-- p2 text
    FORM init.
    DATA:
    wa_repid LIKE sy-repid.
    wa_repid = sy-repid.
    CALL FUNCTION 'AUTHORITY_CHECK_OLE'
    EXPORTING
    program = wa_repid
    activity = sabc_act_call
    application = 'MSCOMMLib.MSComm.1'
    EXCEPTIONS
    no_authority = 1
    activity_unknown = 2
    OTHERS = 3.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    CREATE OBJECT o_obj '"MSCOMMLib.MSComm.1"'.
    IF sy-subrc <> 0.
    RAISE no_create_object.
    ENDIF.
    ENDFORM. " Init
    FORM open_port *
    --> COMMPORT *
    --> SETTINGS *
    FORM open_port USING commport settings.
    SET PROPERTY OF o_obj 'CommPort' = commport.
    SET PROPERTY OF o_obj 'Settings' = settings.
    SET PROPERTY OF o_obj 'InputLen' = 0.
    SET PROPERTY OF o_obj 'PortOpen' = 1.
    ENDFORM. "open_port
    FORM read_port *
    --> INPUT *
    FORM read_port
    CHANGING input.
    DATA:
    wa_buffer TYPE i.
    DO 10 TIMES.
    GET PROPERTY OF o_obj 'InBufferCount' = wa_buffer.
    IF wa_buffer > 0.
    GET PROPERTY OF o_obj 'Input' = input.
    EXIT.
    ENDIF.
    ENDDO.
    ENDFORM. " read_port
    FORM write_port *
    --> OUTPUT *
    FORM write_port
    USING output
    CHANGING input.
    DATA:
    wa_buffer TYPE i.
    SET PROPERTY OF o_obj 'Output' = output.
    DO 10 TIMES.
    GET PROPERTY OF o_obj 'InBufferCount' = wa_buffer.
    IF wa_buffer > 0.
    GET PROPERTY OF o_obj 'Input' = input.
    EXIT.
    ENDIF.
    ENDDO.
    ENDFORM.
    *& Form final
    text
    --> p1 text
    <-- p2 text
    FORM final.
    SET PROPERTY OF o_obj 'PortOpen' = 0.
    FREE OBJECT o_obj.
    ENDFORM. " finalbligw

    Hi ,
    I want to read value form weigh bridge through COMM port. I have developed the FM and done the setting as mentioned in the below link
    Read COMM port using ABAP w/o third party software 
    but while executing the FM independently I am able to get the value from the COMM port,but when I call the FM from a program I am not able to get the output value from the FM.I am calling the FM from the report program.please find the code below.
    report test.
    data : lv_input TYPE c.
    CALL FUNCTION 'ZFM_WEIGHINTERFACE'
      EXPORTING
        MODE                         = 0
        COMMPORT               = 1
        SETTINGS                  = '1200,N,8,1'
        OUTPUT                     = ''
      IMPORTING
        INPUT                        = lv_input
      EXCEPTIONS
        NO_CREATE_OBJECT       = 1
        OTHERS                 = 2
    IF SY-SUBRC <> 0.
    * Implement suitable error handling here
    ENDIF.
    if I execute the FM independently the output is getting perfectly.but while calling from a program i am facing the issue..
    any suggestion is appreciated.
    Thanks
    Vivek

  • Controlled reading from serial port

    I'm trying to establish a connection to an external device through the serial port. This is done in a while-loop which sends an association request tries to get a response if a response is not recieved a new rewuest is sent, etc. At the moment this procedure does not work. I am considering two explanations for this. The first is that the loop does not wait long enough for a response to come and simply keeps pumping out requests, the other is that there is something wrong with the reading algorithm, that doesn't let it properly take in information from the serial port.
    Solved!
    Go to Solution.
    Attachments:
    association_loop.GIF ‏5 KB
    read_visa.GIF ‏8 KB

    I made a new version of the read case. The old version was a while loop, the new version is a while loop which will go on until it encounters an EOF character. In this case it is
    0xC1 or 'Á'. I thought the old version would break before getting any message. This doesnt get any signal either. I have probed it, and it doesn't get a string from which to take the length.
    Attachments:
    read_visa2.GIF ‏10 KB

  • Reading from serial port

    HI,
    I need to read data from virtual serial (rfcomm - BT GPS receiver). I connect to my gps using system command:
    [root@localhost ~]# rfcomm connect /dev/rfcomm0 XX:XX:XX:XX:XX:XX
    and this creates port at /dev/rfcomm0, when I do :
    [root@localhost ~]# cat /dev/rfcomm0
    I get:
    M,0.0,0000*76
    $GPGSA,A,1,,,,,,,,,,,,,50.0,50.0,50.0*05
    $GPRMC,000009.999,V,0000.0000,N,00000.0000,E,,,101102,,*17
    $GPGGA,000010.999,0000.0000,N,00000.0000,E,0,00,50.0,0.0,M,0.0,M,0.0,0000*7E
    $GPGSA,A,1,,,,,,,,,,,,,50.0,50.0,50.0*05
    and the only problem is what to do to read this sequences via java application. I obtained package comm2.0.3.zip , but have no idea what next. I would be grateful for any help.
    best regards
    joshua

    I did everything described here:
    http://www.geeksville.com/~kevinh/linuxcomm.html
    got an example from:
    http://java.sun.com/developer/releases/javacomm/SimpleRead.java
    (the defaultPort = "/dev/term/a"
    replaced with
    defaultPort = "/dev/rfcomm0")
    i connect to my gps with:
    [root@localhost ~]# rfcomm connect /dev/rfcomm0 XX:XX:XX:XX:XX:XX
    start the application and get an error:
    java.io.IOException: Error instantiating class gnu.io.RXTXCommDriver
    gnu.io.RXTXCommDriver cannot be cast to javax.comm.CommDriver
    at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:239)
    at javax.comm.CommPortIdentifier.<clinit>(CommPortIdentifier.java:109)
    at comm.SimpleRead.main(SimpleRead.java:78)
    Exception in thread "main" java.lang.UnsatisfiedLinkError: com.sun.comm.SunrayInfo.isSessionActive()Z
    at com.sun.comm.SunrayInfo.isSessionActive(Native Method)
    at com.sun.comm.Portmapping.registerCommPorts(Portmapping.java:155)
    at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:100)
    at javax.comm.CommPortIdentifier.<clinit>(CommPortIdentifier.java:138)
    at comm.SimpleRead.main(SimpleRead.java:78)
    Java Result: 1
    i think i did everything about rxtx as described. could anyone help?
    best regards
    joshua

  • 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

  • Same photos stored on two drives with one Catalog?

    That's probably not clear to what I'm asking but here goes. I have my main LR Catalog of images on an external drive at home. The LR catalog/database itself is on my MacBook Pro.  That way I can do database 'stuff' with the photos offline when I'm aw

  • ITunes doesn't load all of my music

    For some reason iTunes doesn't load all the songs that's in My Music folder. I have over 3500 songs in that folder but it only imports 451 of them. I never had this problem until today. Can anyone tell me what's wrong

  • Which Photoshop should I buy ??

    Hello, I am interested in buying photoshop and start learning how to edit photos for my boutique (online). My main function would be to edit photos ( to make the clothes color look vivid, make models look slimmer. or etc..) I have NO CLUE on what eac

  • Long running job in BW source system - Urgent

    Hello, While loading BW data delta load for data source 0CO_OM_CCA_9 the corresponding R/3 job is taking the long time to complete approximately 3 days. When we checked the Job log in the Source sytem we found the following entry "2 LUWs confirmed an

  • Iphone app store id is different from the id that is on my settings in the store section.

    hi guys, everytime i try to download a app it says my id is different from the one im suppose to be using. in my settings i go to the store section and it has the one im supose to be using but when i try to download or update a app, a different one c