Select serial comm port in sub vi during run-time

Hi, would like to be able to select the comm port (serial RS232) in sub vi to use in main vi during run time. How can I do this? Have tried and failed, for on startup an error occurs because I have not selected a port yet. An example would be invaluable! Thanks alot, Madri

Hi Madri !
What you could do is to intercept the com errors, and open a configuration vi either if there is an init error or if the user has pressed a "Change port" boollean (or menu...). Do not forget to close the previously opened serial port, and to open/init the new one. I have attached a small example of this idea.
Of course com errors can have various origins, and do not require always to change the serial port. So, you have some additional work to do.
Hope this helps
CC
Chilly Charly    (aka CC)
         E-List Master - Kudos glutton - Press the yellow button on the left...        
Attachments:
Select_port.vi.zip ‏12 KB
Com_with_serial_init_vi.vi.zip ‏13 KB

Similar Messages

  • Solving Prolific PL-2303 USB to Serial Comm Port installation issues

    Hello everybody,
    More and more machines are comming without Parallel and serials ports, they are comming with USB external ports only.
    Some have the RS-232 and Parallel headers in the motherboard, and that should last for about a year I think.
    At any rate, the issue I was facing is the following:
    (a) Installing Prolific PL-2303 USB to Serial Comm Port on Windows XP Pro SP3 works OK and system runs fine. there are some capacity issues regarding the buffer size, but that is another post.
    (b) Installing on WEPOS 1.1 SP3 on some motherboards (Older ones) that have at least the Parallel headers and a serial port, the device also works as with (a)
    (c) Installing on WEPOS 1.1 SP3 with a machine with only external USB's (no parallel / serial port or headers). The installation process runs OK. but when the device
    is plugged I get the following error message:
    "An error ocurred during the installation of the device"
    "A service Installation section in this INF is invalid"
    (d) Installing on POSReady 2009. I get the same as with (c)
    This is how I solved, after many frustrating reboots with the same message about the INF section and multiple Prolific drivers tried.  I started digging windows:
    (1) Find the setupapi.log and read it, if the OS is a fresh install it will not be too long.
    (2) Read this:
    #-166 Device install function: DIF_SELECTBESTCOMPATDRV.
    #I063 Selected driver installs from section [ComPort] in "c:\windows\inf\oem15.inf".
    #I320 Class GUID of device remains: {4D36E978-E325-11CE-BFC1-08002BE10318}.
    #I060 Set selected driver.
    #I058 Selected best compatible driver.
    #-166 Device install function: DIF_INSTALLDEVICEFILES.
    #I124 Doing copy-only install of "USB\VID_067B&PID_2303\5&B6C3FC&0&2".
    #-166 Device install function: DIF_REGISTER_COINSTALLERS.
    #I056 Coinstallers registered.
    #-166 Device install function: DIF_INSTALLINTERFACES.
    #-011 Installing section [ComPort.NT.Interfaces] from "c:\windows\inf\oem15.inf".
    #I054 Interfaces installed.
    #-166 Device install function: DIF_INSTALLDEVICE.
    #I123 Doing full install of "USB\VID_067B&PID_2303\5&B6C3FC&0&2".
    #-035 Processing service Add/Delete section [ComPort.NT.Services].
    #E339 Add Service: Binary "C:\Windows\system32\DRIVERS\serenum.sys" for service "Serenum" is not present.
    #E032 Error 0xe0000217: A service installation section in this INF is invalid.
    #E275 Error while installing services. Error 0xe0000217: A service installation section in this INF is invalid.
    #E122 Device install failed. Error 0xe0000217: A service installation section in this INF is invalid.
    #E154 Class installer failed. Error 0xe0000217: A service installation section in this INF is invalid.
    [2010/02/13 23:32:24 2004.2]
    (3) So it was the serenum.sys file that Windows needed to find in the ..\system32\drivers folder. I got the serenum.sys from one of the temporary folders created by the installation process.
    (3a) So, I think that windows installs this sys file if it recognizes the motherboard has at least one parallel or serial port.
    (4) So good luck when installing your serial device to your POS solution. I will open another thread if I have problems with the buffer size of the device.
    Humberto Sequeira

    Hello Terry,
    Indeed, they were not intended as POS system, the EEE Top machines are candy to the eye, but for my taste they do not work in POS environment (I give them 1 year before they pop). Regarding the other, well competition is tought, so you have to get creative in order to keep costs down, and this one can be used as a waiter stations, that do not need heavy serial comunications.
    Anyways, the POSReady does not install these system files if the installation does not detect a serial or parallel port (which make sense, as why would it install drivers for a device that is not detected). I posted this for others to be aware of this when they select the hardware that will be offered to their customers, as good old "on mother-board" serial and parallel ports cannot be beaten by their USB imitations (IRQ and memory addressing processing are needed for end devices to function properly).
    Have a great weekend,
    Humberto

  • Update Indicator label during Run time

    Hi all,
    This is the situation, i have an Indicator to display Acceleration, Velocity & Displacement. I am using it a local variable in the 2 case structures. 
    Here is what i want to achieve:
    I want to update the Indicator label for the respective Radio Button control. If the click on Acceration button, the label should be updated to Acceleration during Run time. Correspondingly for Velocity and Displacement button. 
    Can anyone help me how to go about this.
    Excuse me if i am not clear about anything.
    Thanks in advance

    Generally you should not change the label of a control, because this is often how the control is referred to from elsewhere in the program and it causes confusion.
    Instead there is a Caption property. If you right click the control and select Visible Items->Caption, the label is hidden and the caption is displayed instead (with the same text).
    In your block diagram, right click on the chart terminal and select Create->Property Node->Caption->Text. This creates a property node for the caption property. You will need to click on it to change it to 'Write' rather than 'Read' - you can then wire whatever text string you like and it will update on the front panel.

  • Changing data in the table control during run time of transaction F-28

    Dear Experts,
    in transaction F-28 of second screen of second column (Field Name: Assignment) currently the data is getting from BSEG table and populating this column of table control, now I have a requirement that the data should be get from the other ZTABLE and populate this column during run time instead of the data from BSEG table, please let me know your suggestions, if you guys feel it will be done using User Exit then please let me know the suitable exit for this.
    Best Regards
    Venkat

    Hi Venkat,
    Use the appropriate sort key in the GL to fill up the assignment field automatically.
    U can create ur new sort key through OB16
    Regards,
    Kiran

  • How to get the Title and Tcode of a Program during run time

    Hello,
    I am new to abap and I have this question please. Is the a way to get the title, Tcode and Author of a program during run time? I would like to get the name and title of a program or a view or an include during run time.
    Using table TADIR, you can only get the object_name and the author. Is the a way for me to get the Title of the repository object and any Tcode if any is available for the case of a program?
    I loop forward for your respond.
    Thank you.
    Sabina

    You can get it by accessing SYST.
    SY-TITLE for Title
    SY-TCODE for Tcode
    I don't think there is any field in SYST for the Author.
    To get the author name you can use the TRDIR table.
    Regards,
    Naimesh Patel

  • In ABAP How to locate an Input file  from a Directory during run time

    I'm loading data from a flat file(text file) into SAP thru BDC programs. All my input files are present in Application server.How to locate an Input file in a directory during run time to process BDC programs programmatically. Are there any in-built functions?Provided me some sample code or any method of doing the same.

    Hello Murali,
    you should ask this question in the ABAP forum.
    Regards
    Gregor

  • My Prompt back ground colour changes during run time in Client / Server Env

    <p>Dear Friends, </p>
    <p> My Prompt of text items are changing its back ground colour according to the Text item's back colour during runtime. This doesn't look good. My look and feel of my application gets spoiled due to this. I tried with Visual Attribute (both prompt & Text item) but of no use. I don't want to use text label as I want to change the prompt during run time. Please help me. </p>
    <p> Form during Design time </p>
    <IMG SRC="C:\Documents and Settings\Administrator\My Documents\My Pictures\myform1.jpg"></IMG>
    <p>Form during Runtime </p>
    <IMG SRC="C:\Documents and Settings\Administrator\My Documents\My Pictures\myform2.jpg"></IMG>
    <p> Thank you.
    Regards,</p>
    <p>Senthil .A. Perumal.</p>
    <p>My version of forms is Forms [32 Bit] Version 6.0.8.8.0 (Production).
    </p>

    Dear Kevin,
    Yes I agree with you, but in my case as this application supports bilingual (English & Arabic), I want to change the prompt of the text at run time. Can I change the text of boilerplate text at runtime?
    Thank you for your reply.
    Regards,
    Senthil .A. Perumal.

  • Variable Creation During Run Time

    Is there anyway to create new instances of variables during run time based off of user input from a command line prompt. Thnx~!

    Depends what you mean .. if you mean the user can type "a = 8", and it creates a variable "a" with the value 8, then no.
    But you can implement something very similar using a HashMap. Use put("a", new Integer(8)), or whatever, and then get it out later with get("a").

  • How to hide the Parameter field during Run time?

    Hi,
    How to hide the Parameter field during Run time?
    I have a parameter field which behaves differently depending on the User logged in.
    I am using reports 10G
    For ex: I have 3 field created in JSP
    CUSTOMER
    PROVIDER
    FROM DATE
    END DATE
    If the user = 'SUPER show all the parameter
    CUSTOMER
    PROVIDER
    FROM DATE
    END DATE
    If the user is 'GATEKEEPER" Just show
    PROVIDER
    FROM DATE
    END DATE
    Can I do that?
    Please help
    Thanks.
    KK

    hi, i'm not familiar much with JSP. but i think workaround is to create two window one which have 4 fields and the other which have 3. if user is SUPER then call the first screen otherwise if user is GATEKEEPER then call the second screen.

  • I get an error when I try to trim my string during run-time??

    I am able to get the string inputted in without the trim.. but when i add the trim, the program screws up during run-time..
    i have this in my code...
    input = in.readLine();
    when i put the following afterwards.. it doesn't work:
    input = input.trim();
    what should i do that I am not doing? or what am I doing wrong?

    You don't specify what the error is, if it's a NullPointerException then you just need to check
    if (input != null) {
        String trimmed = input.trim();
        ...

  • Datatypes and names of columns of recordgroup during run-time

    Hi everyone,
    Can you please tell me that Is it possible to get the datatype and name of columns of a recordgroup during run-time or not. So that I don't waste my time in searching for this solution. If you are not getting my question then please let me know but I need this help very badly.
    Thanks
    Subodh

    After  the call of the methods GET_COLUMN_WIDTH or  GET_ROW_HEIGHT
    You need to add this command :
                            CALL METHOD cl_gui_cfw=>flush.
    This will send back from the SAPGUI  to your ABAP program the new values.
    Found in this Thread  : Method GET_ROW_HEIGHT
    Eric

  • Libjil.iso missing during run time?

    Hi all,
             I am new one to jes. I setup jes in Raspbian on Raspberry machine. libjil.iso is missing during run time. Please help me how to resolve the issue.
    Thanks a lot.

    try to adjust ur repeating fram which prints ur data in ur report.
    some of ur data overlaping that's y it cannot display . most of the time character mode reports generate this error. simply adjust ur repeating fram up and down where it fits u problem will solve.
    tnx.

  • Opening Another Flash File during Run Time

    I know, this is too easy. How do I open a Flash.exe file
    during run time? I know the code below is wrong but some insert the
    correction?
    open_btn.onRelease = function () {
    play("C:\Documents and Settings\GameOfficeFlow.exe");}
    Forever in your debt,
    Mike

    play() is a timeline command.
    I don't think you can have Flash load/play an exe file, but
    wait awhile and see if someone else knows better on that one. You
    can have it load/play an swf version of a Flash file though.

  • Need an option to populate the calculated percentage during run time

    Hi All,
    I have a requirement in reporting , My report out put contains two key figures based on condition it will populate exceptions (green, yellow, Red) .Now i want calcuate Miss percantage (Marked in Red color in expection)
    This Miss percentage to be calculated as per below logic during run time , percentage should populate in out put.
    total no of records in report out put / Miss records (which marked red color in out put)*100
    Regards
    Murali.K

    Hi Murali,
    You need to create three CKF.
    For calculating Red color count, create a CKF and use the Alert level condition which you have used in Exception.
    For Example if your Alert level for red is Value LT 20.
    then "Missed Record CKF" will have ( VALUE < 20) boolean calculation. Hope you aware about it.
    after that create another "Total record CKF" which calculate the number of records by simply keeping 1.
    Then under the third CKF used, SUMGT(Missed Record) / SUMGT(Total Record) * 100.
    Regards,
    Ashish

  • Reading Data from serial (Comm) Port in developer200 forms 6i

    Dears,
    I have developed an application using Dev2k forms 6i.
    I need to read data from a device (weigh bridge) that is attached to PC on comm port.
    scenario: when a vehicle comes on the Weigh bridge it calculates its weight and send it to the PC on serial port.
    on when-button-pressed event I want to get data into a text field on form.
    If any one has developed such form please help me.
    Thanks and regards

    you can:
    create java class -> wrap plsql -> invoke plsql-code from button trigger
    googling java class instead of creating =)

Maybe you are looking for