Even structure function

Hello,
I need some help handling an event structure
issue. Please take a look at the vi attached. Could somebody please explain to
me why the numeric indicator shows only the very first value and then seems
like has been stacked unless the pump boolean turns on? I know that the event structure waits for an event to
occur but i thought that the event case created for the pump boolean has to do with events related to the specific boolean. I can't understand why the the numeric value is updated when I change the value of the pump boolean. Please take
into consideration that I need to modify a preexisting and really complicated
vi and I don’t want to make crucial modifications (e.g move an input inside an
event case in event structure etc.) and also that I am using LabVIEW 8.6.1.
Thank you in advance
Solved!
Go to Solution.
Attachments:
event_structure_issue.vi ‏22 KB

Sorry, but do you mean what I did in the attached vi. Unfortunately, didn't help.
Thank you
Attachments:
event_structure_issue_1.vi ‏22 KB

Similar Messages

  • Even structure/​Mouse Selection

    This is my first attempt at a .vi that seems to need an event structure. I am a student in a research lab and my LabView experience is really learn as you go up till now. The program is designed to track a scanner using two linear pots and read in the voltage measurement. I am using an intensity graph to show the values recorded. What I was told to look into doing was replacing the intensity graph with picture functions so that we had more freedom in the movement of the scanner, which so far seems to be true.
    Currently I am blocking the analog measurements because we don't have the parts, and modeling the movement with controls. The step I am working on now is to be able to select part of the picture and get the data from it. This can be done by saving part of the picture or reading in the data itself corresponding to that part of the picture or (preferably) both. I don't have any experience thus far with even structures except for playing around with them to try to get this to work. The way I have it set up currently seems to completely bog down the system because with it enabled the other functionality appears lost (or just takes forever). 
    So basically I'm looking for help to correctly implement what I have attempted here. As usual I would also appreciate general design critiques (gently). 
    Solved!
    Go to Solution.
    Attachments:
    Scan software.zip ‏74 KB

    ScottC. wrote:
    To avoid starting another thread, I am attempting to better explain what I was doing in the above posts. Here is a much simplified trial code that is doing only what I am having problems with. Basically, we will be having data read in and displayed on a picture so that we have more freedom than with the intensity graph. We then want to be able to select part of the picture and zoom in for more detail. I think I did a poor job explaining this before and so didn't get much out of the replies.
    The block diagram does this how we want it (or at least close enough that I know I can modify it), with one exception. The picture will never update unless the mouse is clicked to allow the while loop to complete another cycle. If it would update continuously and still allow the same zooming functionality I would be well on my way to getting what I want, but I don't understand enough about triggering the events to know how to go about this.
    Ah cardinal sin of new LabVIEW users. I have a post on the forum from my early days where I did the same thing. No need for two event structures in one loop. You can add multiple event cases by right clicking and choosing add event case. Then add your mouse down event to the same event structure as the mouse up event is in already. However, I know why you are doing it. It is so the rest of the code doesn't execute until the mouse up event happens. If you have only one event structure, as soon as you press the mouse down your code will execute, but you won't have the mouse up coordinates. Yes, this will create a problem . However, a better (more complex, but better) way to do this is to dynamically register and unregister mouse events. This is demonstrated in an example that ships with LabVIEW called "dynamically register for events". It is easier to understand than it may seem when first looking at it, but if you need help, continue to post questions.
    And to answer the bold part, it sounds like you need parallel threads. Look at producer consumer architecture which will allow the graph to keep updating while the user is clicking around. The forum is littered with posts on this.
    Message Edited by for(imstuck) on 06-07-2010 03:26 PM
    CLA, LabVIEW Versions 2010-2013

  • Vendor-Customer balances in group currency-table/structure/function module?

    Hi All,
    Which table/structure/function module can be used to get balances for vendors and customers in group currency? We just wnat to extract balances in group currency so FBL1N and FBL5N are not options. Is there any SAP report which can provide these balances for both vendors and customers?
    Thanks and regards,
    Pinky

    Hi Pinky,
    I came across one report S_ALR_87012079 - Transaction Figures: Account Balance, Program RFSRRCUA, which extracts Account Balances of Vendor. Once the report is executed, you can do Currency Translation from one currency to different currencies. In the output screen, in the Top Menu, select 'Settings -> Currency' and you can convert to another currency. I am not sure, if this helps you. If this helps, kindly update your comments here.
    Thank you.
    Suresh Jayanthi.

  • How to run my vi from a front panel control without using even structure in the vi

    Hello, I would like to run my vi from a front pannel control instead of the tool bar RUN botton. I am using LV6.1 without the even structure feature, so I can't do as proposed by a previous posting by setting the vi to run at open in a "do nothing state" then taking the front panel control event and switching the vi into another ("running") state. I wonder is there some other type of solutions to this problem. Your help is greatly appreciated.
    Bryan

    Hi Dennis, thank you for the reply. I tried with the attached vi. It can only run once (also not in the correct state I want), as the control i placed on the front pannel will stop the VI. I want to have the vi do nothing when it is opened and start counting when the start botton is pressed. Then i want it stop counting when the botton is pressed again...and so on... I must need a different structure to get it work, or did I miss something simple? Thanks again.
    Attachments:
    StartVI.vi ‏16 KB

  • Help needed using content and structure functionality

    Several times now I have had users who wanted to move libraries or lists, etc. from one place within a site collection to another.
    The problem is that often, when they go into content and structure, select their source, the only action that appears is Delete, rather than also the copy or move functionality.
    Even when I connect to the farm with the farm account, I see the same issue - the copy and move actions are greyed out. The farm account is one of the site collection owners, as well as of course in the farm admin group.
    Are there certain types of things which cannot be copied or moved? One user is just trying to move a folder of files from a document library to a different location (from working to completed), while another user wants to move most of the files from an old
    project to a new project.
    I am having a tough time understanding why sometimes this works and sometimes it doesn't.

    Thank you for your answer. The user did try to use the windows explorer method, and got an error saying that the operation could not find the source.
    I appreciate the note about moving the files individually. I have suggested that.
    I also appreciate the caution about using move not copy if the versions are needed.
    In one case we have a user who is trying to consolidate 2 different sharepoint sites into 1 site.
    She has asked about moving one into the other.
    I presume that any moving that takes place will overwrite an object of the same name that exists on the other side? Or is there a prompt to the user before the overwrite takes place?
    Thank you so much for your help.

  • Org Model structure function changing after saving also

    HI,
    I am new to CRM and learning CRM.i have created org model by creating marketing,sales and service structure.
    everything works fine.
    but my issue is when i click in service org tab and in function i am selecting service and service org.then i am going to sales org structure and click on it in function i see service is enabled where i have enabled sales before .In same case if i m scrolling through marketing and going to service structure then in service structure in function tab marketing is enabled.
    Can any body tell me any functionality is available in sap CRM to restrict above structure once i have saved it .it will be as usual irrespective If I scroll to different structure.please help me regarding this.
    Reagrds,
    Debesh

    Hi Phani,
    Thanks for your reply.
    I've configured in the same way that you have mentioned but still the same issue is existing.
    Could anyone in the SAP SD Network assist me for the same.
    Reply awaited.
    Regards,
    Sri...

  • Debugging Append Structure Function Module

    Hi,
    If we enhnace the extract structure with append structure and write a function module to fill the data for append structure then how do we debug this function module. When this function module will be executed?
    Thanks.

    Whenever you enhance an extraction structure, the right place to include and execute the code for populating the appended fields is in CMOD.
    In there, you can create a "CASE" entry for your datasource and put the code for it. If you want to call a function module in here, you can do so.
    This code will be executed after the "main" fields in the datasource are filled, right before they're sent to BW.
    You can easily put a "breakpoint" in that code, execute a test extraction using RSA3 and debug your code and logic.
    Regards,
    Luis

  • Draw with picture control using even structure

    what i want to do is use the event structure and picture function vi to draw a figure on the displayed file
    Attachments:
    picturecntrl.vi ‏25 KB

    Maybe something like that? (LV 8.5).
    (You still need to add support for the zoomfactor, etc.)
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    picturecntrlMOD.vi ‏32 KB

  • Financial Statement Structure(Functional Area)

    Dear All,
    Can anyone explain the usage of Functional Area when we Config the Financial Statement.
    Regards,
    Kris

    Hello
    Please check this out and assign points if useful
    Definition
    Account assignment characteristic that sorts operating expenses according to functions, for example:
    Production
    Administration
    Sales
    Research and development
    Use
    If you want to use cost of sales accounting, you have to use functional areas to sort your operating expenses.
    You define your functional areas in Customizing under Financial Accounting ® Financial Accounting Global Settings ® Company code® Cost of Sales Accounting ® Define Functional Area.
    Use
    You can enter the functional area in the master data of the following objects:
    G/L account
    Cost element
    Cost center
    Orders
    Order type
    Internal orders
    Sales order for make-to-order production and requirements class
    Maintenance, service, and QM order
    Production order, product cost controller, and cost object hierarchy
    WBS elements
    Project profile and project definition
    WBS element
    Networks
    Network type
    Network header
    Network activity
    During posting, the system derives the functional area from the master data of the assigned objects. For more information, see  Derivation of the Functional Area.
    Prerequisites
    In order to be able to enter the functional area in the master data of the specified objects, the Functional area field in master data has to be ready for input. For this to be the case, cost of sales accounting for your company codes must either be active for preparation or active.
    You make the settings in Customizing under Financial Accounting ® Financial Accounting Global Settings ® Company Code ® Cost of Sales Accounting ® Activate Cost of Sales Accounting for Preparation or Activate Cost of Sales Accounting.
    The master data of some objects is not company code dependent, rather it is assigned to higher-level organizational units. In such cases, the functional area field is ready for input in all company codes of a client, provided that cost of sales accounting is active for preparation or active for at least one company code of the client.
    In the following cases, the master data of an object is not company code-dependent:
    Object
    Assigned organizational unit
    G/L account
    Chart of accounts
    Cost element
    Chart of accounts
    Cost center category
    Client
    Order type
    Client
    Features
    You have the following options for entry of functional area in the master data of the specified objects:
    Entry of functional area
    You can enter the functional area provided that no postings exist for this object.
    Change functional area
    You can change a functional area that has already been entered as long as no postings exist.
    Where postings already exist, it is no longer possible to change the functional area.
    Postings that have already been made cannot be changed automatically. The functional area is derived only in the case of new postings.
    Where it is absolutely necessary to change the functional area for existing postings, you can find instructions on how to perform the change in Note 115840.

  • MRBR Report- Price and qty variance tables/structure/Function module

    Hi
    I am in the process of developing a customised report similar to MRBR report. I am not very clear on the logic used for "Difference Qty" and "Difference Value".
    MRBR is taking values from strucrure ARSEG. Is anybody aware if there are any tables from where we can get this information ? Are there any Function modules that SAP uses to arrive at this difference.
    I am aware that we canget the information from EKBE table and calculate our seleves. At times the values do not match and the logic do not seem to be straight forward.
    Has someone worked around this area ?
    Thanks for your time in advance.
    Dasaradh

    Hi,
    RBKP_BLOCKED is one important table from where this program gets the blocked invoices.
    Hope this helps.

  • Change sscrfields structure function key dynamically

    Hi ,
       I want to create own function key for selection-screen button in application toolbar.
         If possible to change at run time.
    Thanks.
    INITIALIZATION.
      SSCRFIELDS-FUNCTXT_01 = 'INSERT'.
      SSCRFIELDS-FUNCTXT_02 = 'UPDATE'.
    AT SELECTION-SCREEN OUTPUT.
    SET PF-STATUS 'TEST'  .
    The exixt func.keys are CnttF1 & CntlF2.I want to change into F6 & F7.

    Hi mani,
    welcome to SCN.
    You can not create function key in default selection-screen. Actualy there are 5 pushbutton available there . you can activate or de-activate them. please check the following link for further detail.
    http://help.sap.com/saphelp_nw70/helpdata/en/9f/dba80935c111d1829f0000e829fbfe/content.htm
    Regards,
    Anirban

  • Even structure time

    Can anybody tell me in what format the time is in the event structure?
    I need the time an event is executing, but if I convert it from seconds to Date/Time it give me a spurious date/time.
    If I use a get time “Get Time/Date I Seconds”, I get the current time.
    I’m using Labview 8.2 on XP O/S

    Here are the pics for anyone without LabVIEW 8.2.
    Message Edited by Jarrod S. on 04-18-2007 01:21 PM
    Jarrod S.
    National Instruments
    Attachments:
    GetTime.PNG ‏5 KB
    MainVI.PNG ‏14 KB
    Init.PNG ‏12 KB

  • Tutorial on Event handling structure in labview

    Hello,
    can some one suggest a tutorial on event handling? I want to understand about the adavanced feature of the event handling structure like the dynamic even handling. Further is there any tutorial and examples using the user defined even handling function?
    Regards
    Gopal

    Hi,
    Thank you for those links. I would also like to know about the event menu in labview.Which has functions like create user event, register user events etc., further in event structure there is an option called show dynamic event terminal. what is its purpose and when and where should it be used?
    Regards
    Gopal

  • Function Module Failing in Run Time

    Hello Friend. Thanks to SDN to get this FM created , but still i have some more issues.  I copied the function module RSAX_BIW_GET_DATA_SIMPLE using SE80 TO Z_CUSTOMERB and also the Function Group I copied from RSAX TO ZCUSTB in SE80 ABAP area.
    <b>Error in SE80 FOR Function Group ZCUSTB: Main program Z_CUSTOMERB does not begin with Function-Pool
    please edit my code and let me know how to fix the code to include FUNCTION-POOL</b>
    But when i go to se37 Activated the FM Z_CUSTOMER and check for any syntax error in FM source code it give no error. But when i run the function module using my datasource rsa3 or execute FM then i get the dump
    dump reasons stated.
    1. FM Z_CUSTOMER is not active and hence cannot be found during run time
    2. Function Library contains incorrect entry for Z_CUSTOMERB
    3. Function Module contains no Code even the FUNCTION ... ENDFUNCTION Missing.
    I checked the code and no errors. Please suggest what should I change in FM Setting to fix the error. where is the function library
    Please revise my code to make it work its very simple logic to populate the custom table se11 ZBW_SFLI001_DS to get the data fields from KNA1 and then fetch other fields from KNB1 where KNA1-KUNNR = KNB1 KUNNR.
    Function Module Code
    FUNCTION Z_CUSTOMERB.
    ""Local Interface:
    *" IMPORTING
    *" VALUE(I_REQUNR) TYPE SRSC_S_IF_SIMPLE-REQUNR OPTIONAL
    *" VALUE(I_DSOURCE) TYPE SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
    *" VALUE(I_MAXSIZE) TYPE SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
    *" VALUE(I_INITFLAG) TYPE SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
    *" VALUE(I_READ_ONLY) TYPE SRSC_S_IF_SIMPLE-READONLY OPTIONAL
    *" VALUE(I_REMOTE_CALL) TYPE SBIWA_FLAG DEFAULT SBIWA_C_FLAG_OFF
    *" TABLES
    *" I_T_SELECT TYPE SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
    *" I_T_FIELDS TYPE SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
    *" E_T_DATA STRUCTURE ZBW_SFLI001_DS OPTIONAL
    *" EXCEPTIONS
    *" NO_MORE_DATA
    *" ERROR_PASSED_TO_MESS_HANDLER
    TABLES: KNA1, KNB1.
    DATA: L_S_SELECT TYPE SRSC_S_SELECT.
    STATICS: S_S_IF TYPE SRSC_S_IF_SIMPLE,
    S_COUNTER_DATAPAKID LIKE SY-TABIX,
    S_CURSOR TYPE CURSOR.
    RANGES: l_r_zcalweek FOR ZBW_SFLI001_DS-ZCALWEEK,
    l_r_ZKUNNR FOR ZBW_SFLI001_DS-ZKUNNR.
    RANGES: l_r_ERDAT FOR KNA1-ERDAT.
    DATA: zweek LIKE ZBW_SFLI001_DS-ZCALWEEK.
    DATA: ZKNA1 LIKE KNA1 OCCURS 0 WITH HEADER LINE.
    DATA: ZKNB1 LIKE KNB1 OCCURS 0 WITH HEADER LINE.
    DATA: zitab LIKE ZBW_SFLI001_DS OCCURS 0 WITH HEADER LINE.
    IF I_INITFLAG = SBIWA_C_FLAG_ON.
    CASE I_DSOURCE.
    WHEN 'ZBW_SFLI001_DS'.
    WHEN OTHERS.
    IF 1 = 2. MESSAGE E009(R3). ENDIF.
    LOG_WRITE 'E' "message type
    'R3' "message class
    '009' "message number
    I_DSOURCE "message variable 1
    ' '. "message variable 2
    RAISE ERROR_PASSED_TO_MESS_HANDLER.
    ENDCASE.
    APPEND LINES OF I_T_SELECT TO s_s_if-t_select.
    s_s_if-requnr = I_REQUNR. "Step (B)
    s_s_if-dsource = I_DSOURCE. "Step (B)
    s_s_if-maxsize = I_MAXSIZE. "Step (B)
    APPEND LINES OF I_T_FIELDS TO s_s_if-t_fields. "Step (B)
    ELSE. "Initialization mode or data extraction ?
    IF s_counter_datapakid = 0. "Step (C)
    "Begin of Step (D)
    LOOP AT s_s_if-t_select INTO l_s_select WHERE FIELDNM = 'ZCALWEEK'.
    MOVE-CORRESPONDING l_s_select TO l_r_zcalweek.
    APPEND l_r_zcalweek.
    ENDLOOP.
    LOOP AT s_s_if-t_select INTO l_s_select WHERE FIELDNM = 'ZKUNNR'.
    MOVE-CORRESPONDING l_s_select TO l_r_ZKUNNR.
    APPEND l_r_ZKUNNR.
    ENDLOOP.
    LOOP AT l_r_zcalweek.
    CASE l_r_zcalweek-option.
    WHEN 'EQ'.
    CALL FUNCTION 'WEEK_GET_FIRST_DAY'
    EXPORTING
    WEEK = l_r_zcalweek-low
    IMPORTING
    DATE = l_r_ERDAT-low
    EXCEPTIONS
    WEEK_INVALID = 1
    OTHERS = 2.
    l_r_ERDAT-high = l_r_ERDAT-low + 7.
    l_r_ERDAT-sign = 'I'.
    l_r_ERDAT-option = 'BT'.
    APPEND l_r_ERDAT.
    when 'BT'.
    zweek = l_r_zcalweek-low.
    WHILE zweek <= l_r_zcalweek-high.
    CALL FUNCTION 'WEEK_GET_FIRST_DAY'
    EXPORTING
    WEEK = zweek
    IMPORTING
    DATE = l_r_ERDAT-low
    EXCEPTIONS
    WEEK_INVALID = 1
    OTHERS = 2.
    l_r_ERDAT-high = l_r_ERDAT-low + 7.
    l_r_ERDAT-sign = 'I'.
    l_r_ERDAT-option = 'BT'.
    APPEND l_r_ERDAT.
    zweek = zweek + 1.
    ENDWHILE.
    ENDCASE.
    ENDLOOP.
    DELETE FROM ZBW_SFLI001_DS "Step (E)
    WHERE ZREQUNR = s_s_if-requnr.
    SELECT * FROM KNA1 "Step (F)
    INTO TABLE ZKNA1
    WHERE ERDAT IN l_r_ERDAT
    AND KUNNR IN l_r_ZKUNNR.
    SELECT * FROM KNB1 "Step (F)
    INTO TABLE ZKNB1
    FOR ALL ENTRIES IN ZKNA1
    WHERE KUNNR = ZKNA1-KUNNR
    AND ERDAT = ZKNA1-ERDAT.
    LOOP AT ZKNA1.
    zitab-zrequnr = s_s_if-requnr.
    CALL FUNCTION 'DATE_GET_WEEK'
    EXPORTING
    DATE = ZKNA1-ERDAT
    IMPORTING
    WEEK = zitab-zcalweek
    EXCEPTIONS
    DATE_INVALID = 1
    OTHERS = 2.
    zitab-ZKUNNR = ZKNA1-KUNNR.
    zitab-ZREGIO = ZKNA1-REGIO.
    zitab-ZFAKSD = ZKNA1-FAKSD.
    READ TABLE ZKNB1 WITH KEY KUNNR = ZKNA1-KUNNR
    ERDAT = zKNA1-ERDAT.
    IF sy-subrc = 0.
    zitab-ZZTERM = ZKNB1-ZTERM.
    ELSE.
    zitab-ZZTERM = 'NULL'.
    ENDIF.
    zitab-ZAKONT = ZKNB1-AKONT.
    ENDLOOP.
    INSERT ZBW_SFLI001_DS FROM TABLE zitab.
    OPEN CURSOR WITH HOLD s_cursor FOR "Step (I)
    SELECT (S_S_IF-T_FIELDS) FROM ZBW_SFLI001_DS
    WHERE zrequnr = s_s_if-requnr.
    ENDIF.
    FETCH NEXT CURSOR s_cursor "Step (J)
    APPENDING CORRESPONDING FIELDS
    OF TABLE E_T_DATA
    PACKAGE SIZE S_S_IF-MAXSIZE.
    IF SY-SUBRC <> 0. "Step (K)
    CLOSE CURSOR S_CURSOR. "Step (L)
    DELETE FROM zbw_sfli001_ds "Step (M)
    WHERE zrequnr = s_s_if-requnr.
    RAISE NO_MORE_DATA. "Step (N)
    ENDIF.
    s_counter_datapakid = s_counter_datapakid + 1. "Step (O)
    ENDIF.
    ENDFUNCTION.
    null

    In the top include for the function group, ensure that the first line is:
    FUNCTION-POOL Z_MY_GROUP.
    Where Z_MY_GROUP is the actual name of the actual function group that your actual function module belongs to.
    Rob

  • Extent of Coding inside Event Structure cases

    Hi all
    I am trying to understand the practices while using an Event Structure. I am used to developing most of my projects using an Event driven State Machine Architecture. Most times, I use Event driven-Queued State Machines. I have also used Producer Consumer Architecture with Event structure driving the producer.
    I have always believed that using lots of code, or lots of sub-vis inside one or more cases of an event structure is not a good practice. I reasoned that it will delay the capture of other events occuring while the current case is still executing. This was one of our points during design review, i.e., to reduce the code inside event strucutre cases to as minimal and necessary as possible. We used clusters/queues/LV2Gs inorder to pass on the required data, which will be processed in the other cases/loops.
    However, I happened to recently come across a couple of very old applications upgraded to LV2011. The applications used an event structure in one of the while loops, with one or more parallel while loops inside the Main VI. The event structure was the only code in this while loop, no case strucutres.
    These event structures had loads of code in each case, with sub-vis and nested sub-vis, even DLL function calls among them. Thats when I started to look for information on best practices using event structures and about any available details on the extent of coding allowed inside an event strucutre.
    One sub-vi which was called as a dialog box also had its own event structure (ending up as ensted event structures). I have read about nesting event structures and their disadvantages.
    Off course, the code is working and I am not sure if anyone had any execution problems with the applicaiton.
    However, I am wondering about the pros and cons of having the entire code inside event structure. I would have defined that code a nightmare. Its disturbing me to see that code and being unable to make it better.
    To my understanding, I wish to know if there is any definition or rule regarding the amount of code inside an event structure.
    Thank you

    The exception I use is User driven intefaces where every user action must get a response and each change must complete before the next. In those cases an event only implelmentation is generally fine.
    Now if that code does something that takes long enough for the user to question if the program is still alive should at least get a "Busy cursor" OR a progress bar OR an abortable progress bar where the user get s the option to abor out. THe last case may warrent a parallel process to crunch the numbers.
    But please keep in mind the above suggestions apply only to those User only" type things. Applcations that invlove the word "while" will generally get deamons and other common design patterns used to henld the implementation. But now I have drifted to design teory and away from the subject so ...
    Have fun!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

Maybe you are looking for