How to get a case structure to execute only once in a loop

I have a while loop that is monitoring temperature. Once the temperature meets or exceeds a given setpoint I want to start a timer. At this point I don't want to monitor the temperature anymore. That is, if the temperature should drop below the setpoint, I don't want to execute the case structure again when the temperture meets or exceeds the setpoint(the temp may oscillate about the setpoint for a given period of time). In any event, I need the case structure to execute only one time, not every iteration of the loop.

You can put a local Boolean variable "Flag" inside that case structure and
set "Flag" to False. Outside the case structure, use an "AND" function
output to control the case structure. The "AND" function has two inputs. One
goes to the comparison results between real temp and setpoint. The other
inputs connects to the "Flag" variable. In this way, once you entered that
case structure, the "Flag" will be turned to False, and then in next
iteration, you won't get into the case again because the "AND" function will
be False as your "Flag" is False now.
Hope this helps.
Rentian
1. Inside the case structure, put a
"BB Herman" wrote in message
news:[email protected]..
>I have a while loop that is monitori
ng temperature. Once the
> temperature meets or exceeds a given setpoint I want to start a timer.
> At this point I don't want to monitor the temperature anymore. That
> is, if the temperature should drop below the setpoint, I don't want to
> execute the case structure again when the temperture meets or exceeds
> the setpoint(the temp may oscillate about the setpoint for a given
> period of time). In any event, I need the case structure to execute
> only one time, not every iteration of the loop.

Similar Messages

  • How to get lauchctl daemons/agents to run only once a day

    How do you get a daemons/agents to run only once a day regardless of the error code of the .sh you are running?
    (not I'm not looking for run once or run on reboot. I want a job to run at 3am every day and it has several bash commands in it. Regardless of the returns by any of the commands in the script, I only want this to run once - NO RESPAWN).

    Ok still not working.. here is the plist
    the .sh file does file processing and then uploads xml files to my server and should run once a day. Here I have it running at 11:45am. It completes and then runs again and again and again.
    The plist is placed in LaunchAgents and loaded with $launchctl load com.iclassicnu.crontabtest.plist
    ideas?
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>label</key>
    <string>com.iclassicnu.crontabtest</string>
    <key>ProgramArguments</key>
    <array>
    <string>/Users/dan/Desktop/iClassicNu/Idea/Forexite/ForexUpdate.sh</string>
    </array>
    <key>WorkingDirectory</key>
    <string>/Users/dan/Desktop/iClassicNu/Idea/Forexite</string>
    <key>OnDemand</key>
    <false/>
    <key>Nice</key>
    <integer>1</integer>
    <key>StartCalendarInterval</key>
    <dict>
    <key>Hour</key>
    <integer>11</integer>
    <key>Minute</key>
    <integer>45</integer>
    </dict>
    <key>StandardErrorPath</key>
    <string>/Users/dan/tmp/icnTest1.err</string>
    <key>StandardOutPath</key>
    <string>/Users/dan/tmp/icnTest1.out</string>
    </dict>
    </plist>

  • How to get the organization structures of a compnay code (BUKRS)?

    Hi Friends,
    I have a requirement to get the organization structures of a compnay code (BUKRS), such as Controlling area, Credit control area, Plant, Sales Organization, Purch. Organization, Personnel area.
    How can I get them, I only know the compnay code table is T001, but how to get the organization structures  of a compnay code (BUKRS) into a internal table?
    Thanks a lot!

    Hi,
    A lot of table will be involved for the same.
    The company code is the highest unit and all other things are assigned to it.
    Check the settings in SPRO as to how the maintainance is done.
    From here you will get the maintainance view details if you do F1 help on each field.
    From this view you can get the relevant tables.
    For eg.
    Go to SPRO>Controlling>Organization-->Maintain Controlling Area
    Here you will find the assignment of controlling area to the company code.
    The maintainance view is V_TKA02 and the tables involved are TKA02, TKA01, T001
    In this way you can find the relevant tables.
    Regards,
    Ankur Parab

  • On the back of the ipod is the information can anyone tell me how to get a cases like that

    on the back of the ipod is the information can anyone tell me how to get a cases like that?
    ansd wat is the best ipod touch 4g cases made and does apple amke some?

    https://expresslane.apple.com/GetSASO.action?caller=sfaq&PRKEYS=PF3&locale=en_US

  • How to execute only once the *copy* about LRF1 tcode ?

    Hi Experts !
    I duplicated the LRF1 tcode by ZLRF1 tcode with the main program SAPLZLRFMON (please see below).
    I have an issue with the execution about the ZRLF1 tcode, normally the LRF1 tcode can be execute only once under the same warehouse number, but my transaction ZLRF1 can be execute by more than one user at a time. I debug the execution about the ZLRF1 with a breakpoint set into LZLRFMONF01 include (include test connection) but the system excute the transaction without regard to the breakpoint set into LZLRFMONF01. Did I forget anything ?
    thanks in advance for your help.
      System-defined Include-files.                                 *
      INCLUDE LZLRFMONTOP.                        " Global Data
      INCLUDE LZLRFMONUXX.                        " Function Modules
      User-defined Include-files (if necessary).                    *
    *Class implementations
    INCLUDE LZLRFMONCL2.
    *INCLUDE LLRFMONCL2.
    INCLUDE LZLRFMONCL3.
    *INCLUDE LLRFMONCL3.
    INCLUDE LZLRFMONCL4.
    *INCLUDE LLRFMONCL4.
    INCLUDE LZLRFMONCL5.
    *INCLUDE LLRFMONCL5.
    INCLUDE LZLRFMONCL6.
    *INCLUDE LLRFMONCL6.
    INCLUDE LZLRFMONCL7.
    *INCLUDE LLRFMONCL7.
    INCLUDE LZLRFMONCL8.
    *INCLUDE LLRFMONCL8.
    INCLUDE LZLRFMONCL9.
    *INCLUDE LLRFMONCL9.
    INCLUDE LZLRFMONCLA.
    *INCLUDE LLRFMONCLA.
    *PBO-Modules
    INCLUDE LZLRFMONO01.
    *INCLUDE LLRFMONO01.
    INCLUDE LZLRFMONO03.
    *INCLUDE LLRFMONO03.
    *PAI-Modules
    INCLUDE LZLRFMONI01.
    *INCLUDE LLRFMONI01.
    INCLUDE LZLRFMONI03.
    *INCLUDE LLRFMONI03.
    INCLUDE LZLRFMONF01.
    *INCLUDE LLRFMONF01.
    INCLUDE LZLRFMONF02.
    *INCLUDE LLRFMONF02.

    CHRISTIAN MEYER wrote:>
    >  Did I forget anything ?
    Yes - Standard SAP programs quite often check the program name and transaction code being executed. If you look at program SAPLLRFMON, you'll see that it uses both the program name and transaction code (LRF1) in a number of places. You have to go through your copy, looking for these places and add the logic for your trasnaction code an program names.
    Rob

  • How can I create a one time cron schedule that would execute only once in C#?

    I have used cron schedule in C# to create an application that should trigger a job only once. This code piece is throwing an exception, An unhandled exception of type 'Quartz.SchedulerException' occurred in Quartz.dll
    Below is my code:
    class Program
    static void Main(string[] args)
    Test();
    public static void Test()
    ISchedulerFactory schedulerFactory = new StdSchedulerFactory();
    IScheduler scheduler = schedulerFactory.GetScheduler();
    IJobDetail jobDetail = JobBuilder.Create<SatellitePaymentGenerationJob>()
    .WithIdentity("TestJob")
    .Build();
    Console.WriteLine(DateBuilder.DateOf(16, 30, 00, 24, 2, 2015));
    //ITrigger trigger = TriggerBuilder.Create()
    // .ForJob(jobDetail)
    // .WithCronSchedule("0 0 12 20 4 ? *")
    // .WithIdentity("TestTrigger")
    // .StartNow()
    // .Build();
    ITrigger trigger = TriggerBuilder.Create()
    .WithDescription("Once")
    .WithSimpleSchedule(x => x.RepeatForever().WithRepeatCount(1))
    .StartAt(DateBuilder.DateOf(12, 43, 00, 26, 2, 2015))
    .Build();
    scheduler.ScheduleJob(jobDetail, trigger);
    scheduler.Start();
    internal class SatellitePaymentGenerationJob : IJob
    public void Execute(IJobExecutionContext context)
    Console.WriteLine("test");
    I believe that the way I have done scheduling to be execute only once is causing the issue. Please advice.
    mayooran99

    Hi mayooran99,
    From the additional information: Repeat Interval cannot be zero. The screenshot
    as below.
    You should specify a repeat interval in seconds. 
    Please try the following code
    ITrigger triggers = TriggerBuilder.Create()
    .WithDescription("Once")
    .WithSimpleSchedule(x => x
    .WithIntervalInSeconds(20)
    .RepeatForever())
    .StartAt(DateBuilder.DateOf(12, 43, 00, 26, 2, 2015))
    .Build();
    Have a nice day!
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Strategy plan with package to be executed only once

    Hi All,
    Created a time based maintenance plan with strategy. Included 4 maintenance packages in the strategy. One of the maintenance package should be executed only once upon scheduling the maint. plan and should be due on the date on scheduling.
    What scheduling parameters are to be maintained?
    Regards,
    Abhijit

    Hi Abhijeet,
                      The Functionality of Offset is actually different.
    Suppose you procure a new Equipment, you have erected and comissioned, but the use will anly after 3 months as the predessing and subsequent Equipment needs some time for the Erection and comissioning, in this case, you maintenance plans should start after 3 months only,
    for this reason the Offsetting Field is used.
    that is if you maintain the offseting of 3 months then the cycle will start after 3 months.
    it means that if today is 20th December and you have a cycle frequency of 1 month and you give the offseting for 3 months then your plan will be only activated from 20th march,and the first order will be generated 1 month(cycle period) after that.
    that is 20th April.
    Hope it further clarifies your doubt.
    Regards,
    Yawar Khan

  • How do I get a case structure's panel?

    I am trying to place a boolean indicator within a case structure via LabVIEW scripting and am not having any luck.
    I started with the following source code, which creates and populates a case structure from an array:
    https://decibel.ni.com/content/docs/DOC-22703
    So my code, rather than put an enum inside each case, creates some compound arithmetic and a mask for each case.  This is all working fine.  I now want to place boolean indicators on the front panel that correspond to each case, and this is where my problem is.  I can create the indicators, but when I look at the block diagram view, all of the indicators are located outside of the case structure, rather than the indicators being inside of each respective case.
    I think the reason is that a boolean indicator is created by passing a reference to the front panel.  But the problem with this is that the VI panel reference does not indicate that the boolean should be placed inside the case structure, just on the panel, so when you view in block diagram mode, it's just thrown the indicators all outside the case structure and wired them up via tunnels.  I am getting the panel reference by accessing the OwningVI field of my CaseSel object.  I feel like there must be some field I should be able to access that indicates to put the block-diagram boolean inside of the respective case structure, but I can't find it.
    I've attached a file with 3 pics in it.  One shows a pic of the code I'm using to create the indicators.  One shows the type of output I'm looking for.  One shows the type of output I'm getting.
    Solved!
    Go to Solution.
    Attachments:
    lv_case_struct.jpg ‏221 KB

    Before you connect the wire to the terminal, call the Move method on the indicator's terminal and use one of the case structure's Diagrams[] as the owner. This will move the terminal into the structure.
    Try to take over the world!

  • How to get nested JSON structure from OData service result

    Hi all,
    This is what I have done :
    I have developed OData service where I am following below steps :
    1. Created Stored procedure for the logic
    2. Created scripted calculation view and call stored procedure from the view.
    3. Created OData Service where I am calling calculation view with multiple parameters.
    Every thing is working fine and I am getting proper JSON Result which all the attributes that I am returning from the view in flatten structure.
    Additional requirement:
    On top of this I have additional requirement where I want to get various aggregation or counts.
    For example : from view I am getting all the customers result as result set and I also want some summary level information along with that such as :
    1. Total Number of Records
    2. Total VIP Customers
    3. Total Individual Customers
    4. Total Business Customers
    Above counts can not be each records level information so I need this details in my OData Service result as separate summary section like nested JSON structure.
    For example :
    d: {
    results: [
    __metadata: {
    uri: "http://servername:8000/testmulti.xsodata/calmultiview1('123456')",
    type: "Cust.Multiview1.calmultiview1Type"
    aggregation: {
    totalrecords: "",
    totalVIPCustomers: "",
    totalIndividualCustomers:"",
    totalbusinesscutomers:""
    ID: "123456",
    ENT_ID: 1234,
    FIRST_NM: "ABC",
    LAST_NM: "XYZ",
    CITY: "DELHI",
    In above example like _metadata , I am asking how to get aggregation section also in the JSON result?
    aggregation: {
    totalrecords: "",
    totalVIPCustomers: "",
    totalIndividualCustomers:"",
    totalbusinesscutomers:""
    Please suggest best possible way to implement this kind of requirements.
    Thanks
    - Dharmesh

    Don't expect that OData can help you for this. Still you can try the following.
    Create a XSJS service where you can execute your procedure manually and get the aggregation as well. From the XSJS , you can loop over the result sets and build your corresponding JSON format. But, you can not implement the features of OData, as the return would be "just" a JSON.
    in any way you can establish an association with your main entity and aggregation entity(I am Sure, the worst case), you can get both in the same payload.
    Sreehari

  • Keeping count of how many times a case structure has been entered.

    I have a "Case" structure (when a button is pressed, it is "case True").
    I want to keep track of how many times this "case True" has been entered.
    How can I do this?
    Solved!
    Go to Solution.

    For that you need to have a shift register or a feedback node and keep counting whenever the case structure case is executed the count will be increased by one see the attached snippet.
    Good Luck
    The best solution is the one you find it by yourself
    Attachments:
    CaseStructure count.png ‏10 KB

  • How to manage a case structure Untill a value is reached

    Dear all,
    I am collecting data with DAQmx and after a value is reached i want to do smthg else, for this reason i created a case structure and i put to the case selector that if a value is smaller than "10" then it is true. If it is false it should stop and do what i say even if the value gets under "10 again". 
     So how can i make this: "once the value is reached then do what i say  even if  the case selector value is back to true state after a while"
    Thanks.
    Kind regards.
    Solved!
    Go to Solution.
    Attachments:
    False-CaseStructure.png ‏15 KB
    True-Case-Structure.png ‏19 KB

    You can use the shift register to make a condition so once it enters into the value greater than limit case then it will not go to the other case even if the value goes below.
    The best solution is the one you find it by yourself
    Attachments:
    Case Selector.vi ‏7 KB

  • How can i set case structure always true on boolean impulse?

    Hello everyone! I need a little help. All i want is to set a condition when to acquire data from my acquisition board. I have a sinusoidal pulse and when value its near zero (between 0.5 and -0.5) i want to start to write data and also stop condition. How can i make my case structure to remain set to true until next condition? Thanks in advance!
    Attachments:
    Untitled.png ‏104 KB

    sdadasdas wrote:
    Thank you! I'm a beginner in labview and any advice is welcome!
    I highly recommend tutorials if you are really new.  Otherwise, just keep asking questions.  You'll figure it out soon enough.
    3 Hour Introduction
    6 Hour Introduction
    LabVEW Basics
    Self Paced training for students
    Self Paced training beginner to advanced, SSP Required
    LabVIEW Wiki on Training
    Learning NI
    Getting Started with NI Products
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to get the NameTab Structure(X031L) for Dynamic internal table?

    when we pass standard table to the FM 'DD_GET_NAMETAB' we will get the
    nametab structure(x031l), like this i want to get the same structure for
    dynamic internal  table . how can I achieve this
    please help me...

    Hi,
    try this method
    REPORT zmaschl_create_data_dynamic .
    TYPE-POOLS: slis.
    DATA: it_fcat TYPE slis_t_fieldcat_alv,
          is_fcat LIKE LINE OF it_fcat.
    DATA: it_fieldcat TYPE lvc_t_fcat,
          is_fieldcat LIKE LINE OF it_fieldcat.
    DATA: new_table TYPE REF TO data.
    DATA: new_line  TYPE REF TO data.
    FIELD-SYMBOLS: <l_table> TYPE ANY TABLE,
                   <l_line>  TYPE ANY,
                   <l_field> TYPE ANY.
    Build fieldcat
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'       EXPORTING           i_structure_name = 'SYST'       CHANGING           ct_fieldcat      = it_fcat[].   LOOP AT it_fcat INTO is_fcat WHERE NOT reptext_ddic IS initial.        MOVE-CORRESPONDING is_fcat TO is_fieldcat.        is_fieldcat-fieldname = is_fcat-fieldname.        is_fieldcat-ref_field = is_fcat-fieldname.        is_fieldcat-ref_table = is_fcat-ref_tabname.        APPEND is_fieldcat TO it_fieldcat.   ENDLOOP.
    Create a new Table
    CALL METHOD cl_alv_table_create=>create_dynamic_table       EXPORTING        it_fieldcatalog = it_fieldcat       IMPORTING        ep_table        = new_table.
    Create a new Line with the same structure of the table.
    ASSIGN new_table->* TO <l_table>.CREATE DATA new_line LIKE LINE OF <l_table>.ASSIGN new_line->* TO <l_line>.
    Test it...
       DO 30 TIMES.
          ASSIGN COMPONENT 'SUBRC' OF STRUCTURE <l_line> TO <l_field>.
          <l_field> = sy-index.
          INSERT <l_line> INTO TABLE <l_table>.
       ENDDO.
       LOOP AT <l_table> ASSIGNING <l_line>.
          ASSIGN COMPONENT 'SUBRC' OF STRUCTURE <l_line> TO <l_field>.
          WRITE <l_field>.
       ENDLOOP.

  • How to get PNP Org Structure to reflect the org structure as of key date?

    I created a custom program using the PNP logical database.  I defined a custom report category indicating the selection period = employee selection period and allowing org.structure.  I’m also using the standard SAP PNP_DEFAULT selection view. 
    Inside my ABAP I initialize the pnpbegda and pnpbegps to reflect 20060930.  Upon Execution the key date reflects 09/30/2006.  I click on the org.structure button.  The org.structure displayed reflects the one as of today rather than as of Sept-30. 
    During run debug I see that the RP_PNP_ORGSTRUCTURE  program, LRPPNU11, calls function 'RH_TYPE_STRUC_HELP' to get the org.structure.  The call to this function passes 09/30/2006 for the begda and endda, but it still returns the latest org.structure.  I did some playing with this function and found that if I also pass the ACT_SEARCH_WEGID as ORGEH it works.
    Any idea on how I can get the LRPPNU11 program to pass the ACT_SEARCH_WEGID or the subsequent called functions to process for ORGEH?

    thanks. but maybe I don't describe my problem well.
    I use javascript to get some information such as position, sytle of each elements and then pass these to javafx. So the besides the dom tree, I can get more information about elements.
    I need to pass them back to javafx.
    if node support setUserData, I can associate them to each Node/Element. But webkit don't support this feature.
    BTW, If javascript pass a object to javafx. it can only deal with primary types such as string, numeric. But I need pass back a complicated javascript object like:
    {name:"parent", children:[{name:"child1"},{name:"child2"}]
    I can use (String)JSObject.getMember("name"); and JSObject children=JSObject.getMember("children");
    but I can't cast children to Object[] or JSObject[].
    so I have to use some tricky to convert Javascript Object to json string and then in javafx convert it back to Object tree.
    Edited by: user12956197 on 2013-3-11 上午4:27

  • How to change the case structure to string input?

    Hi,
    I have the inner case structure that it will decide to set "DC Voltage" or "DC Current" mode. The "Output Function" contained the selection of function "DC Voltage" or "DC Current". So far it only work with DC Voltage not DC Current. My question is how do I change the case structure to string selector? When the output function is selected to DC Voltage then the case structure is selected DC voltage case. Please help Thanks.
    Attachments:
    test.vi ‏35 KB

    You don't really need to convert the value to a string? The problem is that the value of the individual ring items are not 0 and 1, as you assumed. The values generated by the controls are:
    DC Voltage: 1006
    DC Current: 1007.
    You can find this out by viewing the properties for the "Output Function" and going to the "Edit Items" tab.
    So, all you need to do is change the 0 to 1006 and the 1 to 1007 for your case items.
    By the way, your sequence frame serves no purpose.

Maybe you are looking for

  • Help w/ DVI to VGA

    I bought a Mini DVI to VGA adapter so I can connect my MacBook to my old LCD screen when I am at home. Im not much of a dork when it comes to working with these kinds of things, so I dont really know what the best configuration for the settings. This

  • Determine if layer is black and white (or desaturated)

    Is there a way to programmatically determine if a layer of a PSD is black and white?

  • Use of ESC key to close e-mail

    HI All, Is it possible to set up Mail to allow use of ESC key to close an open e-mail ? The best shortcut i can find to do this is cmd-w. All other (non-apple) email applications I have used allow the use of the ESC key. Thanks

  • When i update PS CS6  I get  Error Code: U44M1I210.

    Already uninstalled and reinstalled PS First time after reinstall update gets to 99% and crashes any atempt to updaye after that it gets to 3% then U44M1i210 Message was edited by: CHarley Ulmy

  • Health check for load balancing ALSB/OSB instances

    What is the standard practice for a load balancer sitting in front of ALSB/OSB instances as far as a health check? I'm working with our IS department to implement a valid health check. Currently the load balancer (older model cisco device) is just ch