8am morning run labview once, 4pm run once again, and it continues forever everyday

Hi everyone,
I have  wrote a programm with if case which checks whether the time stamp lies between 8am til 4pm with time range. If outside this range, it will send a signal to shut a relay down, if within this time frame, it will send another signal to turn it on. But the problem is, it runs 24 hours everyday to check this condition with while loop and if case, combine with timerange.
Does anyone has an idea , where the programm only runs twice a day, which is 8am run the program to turn it on, and 4pm run another time to turn it off, without repeating everytime.
I have a feeling it is time loop structure related and have tried it, but I can't seem to set the start time as 8am, and end time at 4pm, what i can manage to do is that in the first frame in time loop, it runs and it turn on, and the second frame has to wait a very long time(whatever time u set), then it will execute to turn it off. It works but everytime i have to calculate the time difference. I am looking for alternatives.
Thanks for anyone's help.
Have a nice day.

I think it is Ed Dickens who sprats a signature that reads something to the effect of;
"Using the abort button to sop your application is like using a tree to stop your car. It will work but you may not like the consequences."
Calculating time difference for 24 X 7 apps is not as easy as it appears due to Daylight Savings Time. DST introduce one day a yeear that has 25 hours and another day that has only 23 hours. We can not code these dates at development time since they are subject to the will of the congress and are subject to change ("Woe to those who seek to change times and ways." Is that Revelations?).
Since you target times do not fall into the nebulus hour that may or may not be there, I would recomend you set up a loop (timed or not) that queries the system time once a second to see if the current time meets your criteria. When doing the check don't try to an exact match of the time since the code may run end up missing the exact hour by a handful of seconds one way or the other due to other processes runing on the machine.
This thing all things devour:
Birds, beasts, trees, flower;
Gnaws iron, bites steel;
Grinds hard stones to meal;
Slays king, ruins town,
And beats high mountain down.
JRR Tolkiens The Hobbit, Riddles in the Dark , Time.
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction

Similar Messages

  • My mac won't recognize an external monitor. The screen Goes Blue Once, then goes blue again and the second monitor just turns off. I am using an HDMI adapter to a visio TV. I also have my xbox on the tv. Can anyone Help??

    My mac won't recognize an external monitor. The screen Goes Blue Once, then goes blue again and the second monitor just turns off. I am using an HDMI adapter to a visio TV. I also have my xbox on the tv. Can anyone Help??

    Lol, figured out the first part. Just for those who may be searching, when you click on the Display Preferences, and click on the arraingment tab... it not only shows where your two screens will be displayed, but the WHITE BAR at the top of one screen is the dock/toolbar. Click and hold to grab this and just slide it over to the screen you'd like it to be on.
    You have to release it IN the screen box, not on top of it... and it should pop right over to the new (or old) screen. At any rate, you can put the dock on either (or any) screen that you prefer.
    I am thinking of ordering more of these. Lol. 3 monitor setup seems like it would be crazy good.
    Still looking for the answer to keeping the new 16" screen on the right without switching between screen #s with that... not expose... Lion feature.
    Thanks. Hope my other question has an answer out here.
    Paul H

  • I want to run my .exe file in same time when Labview started to run

    Somebody know, how do it?

    Slonbob wrote:
    Yes, but I want run LabVIEW, then run my exe backgroung
    Right, so run a batch file instead of LabVIEW.
    Or if you must run "LabVIEW.exe" rename "LabVIEW.exe" to "LabVIEW Backup.exe" then make an EXE that just runs "LabVIEW Backup.exe" then your program and name it LabVIEW.exe.

  • Intel Galileo board - is it possible to run LabView code

    Hello,
    can anybody tell me, if it is possible to run Labview code on Intel Galileo board (http://www.intel.com/content/www/us/en/do-it-yourself/galileo-maker-quark-board.html) ?
    This board is Arduino "compatible", but runs x86 architecture and Linux. So it is possible tu run LabView Linux runtime on this board (and LabView code)? If answer is yes, can anybody provide howto?
    I'm not interested in LINX (https://www.labviewhacker.com/doku.php?id=libraries:linx:linx) which just access the Arduino board. It is just "comunication API" allowing to access arduino board but not to develop a code arduino can run.
    It would be great if there will be possibility to develop all code in for Arduino board in LabView (even with some limitations).
    Thank you for any answers
    Pepin 

    dkfire wrote:
    Hooovahh: The Intel Galileo board is like the Pi and BeagleBone Black boards.
    They run a "full" Linux. They can run normal compiled linux programs. 
    The Intel board is just a little smaller than the Pi/BBB, with "only" 400Mhz processor, but then it is a x86 processor and not a ARM like the two other boards.
    But I don't think that LabVIEW have any run-time enginen for this board.
    If that is the case then what is wrong with loading up the Linux Run-Time for x86 processors that NI has?  I have no idea what the process would be to bring over the installer or executable but if what you are saying is true then it seems more likely that it could work.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Using Adobe 11 reader, now comes up with an error, once file is opened. 'Invalid plugin detected, Adobe reader will quit. Closes the program so cannot view PDF files. Running windows 7. I have uninstalled and re-installed Adobe still the same. HELP

    Using Adobe 11 reader, now comes up with an error, once file is opened. 'Invalid plugin detected, Adobe reader will quit. Closes the program so cannot view PDF files. Running windows 7. I have uninstalled and re-installed Adobe still the same. HELP

    Sounds like something has been added into the Reader folder. I would recommend uninstalling, running http://labs.adobe.com/downloads/acrobatcleaner.html, removing any left over parts of the Reader folder (this might have been the problem), reboot, and reinstall. Hopefully that solves the problem. For future question about Reader, you should consider asking in the Reader forum, this is not it.

  • Can jdbc be written once but run everywhere?

    hi everybody,
    i am using jdbc. Since for different databases, their sql statements are not exactly the same. So my jdbc program which is written for an Oracle database cannot run for a MySQL database. For example, in Oracle, i created a silly table like this:
    CREATE TABLE hello (
    id integer,
    primary key (id) );
    but in MySQL, in order to create the same table, i have to modify my sql statement like this:
    CREATE TABLE hello (
    id integer primary key );
    So , if i create such a table in my jdbc program, i have to modify my codes so as to migrate my jdbc program from Oracle to MySQL. For a java programmer who wants his programs to be written once but run everywhere, this is not a beautiful thing.
    I dont know if SUN has provided some technologies to avoid this dependence. Perhaps SUN has defined a unified sql for java(jsql?) and make the translation from jsql into special sql of different databases a task of jdbc drivers?
    Heavy Z

    Hi,
    This is a simple one compared to the lazy way that MS decided to implement Access database and the sql code. The wildacard * does not work from java programs where you have to use the %.
    Fortunately, maybe, standards are improving, but be aware that you may have to know silly discrepancies until there is proper standardisation.
    This includes the different spellings between English and American too.
    best
    kev

  • I have iPhone 4 runs on iOS 7 and now iPad mini 2 run on iOS 8 but once I install iTunes 12 64 but windows den will it work for iphone4

    I have iPhone 4 runs on iOS 7 and now iPad mini 2 run on iOS 8 but once I install iTunes 12 64 but windows den will it work for iphone4 ?

    Hi bhaity2014,
    Welcome to the Apple Support Communities!
    I understand that you are concerned that your iPhone 4 running iOS 7 may not be recognized in iTunes 12. Your iPhone 4 running iOS 7 should have no issues being recognized or syncing with iTunes 12. If it is not recognized in iTunes on your Windows computer, please use the attached article for troubleshooting assistance. 
    iPhone, iPad, or iPod touch not recognized in iTunes for Windows - Apple Support
    Best regards,
    Joe

  • When I run the program Adobe Premiere Pro CC I at once freezes the computer completely and to make it work I have to restart his, what do I do?

    When I run the program Adobe Premiere Pro CC I at once freezes the computer completely and to make it work I have to restart his, what do I do?

    More information needed for someone to help... please click below and provide the requested information
    -Premiere Pro Video Editing Information FAQ http://forums.adobe.com/message/4200840
    •What is your exact brand/model graphics adapter (ATI or nVidia or ???)
    •What is your exact graphics adapter driver version?
    •Have you gone to the vendor web site to check for a newer driver?
    •For Windows, do NOT rely on Windows Update to have current driver information
    •-you need to go direct to the vendor web site and check updates for yourself
    •nVidia Driver Downloads http://www.nvidia.com/Download/index.aspx?lang=en-us
    •ATI Driver Autodetect http://support.amd.com/en-us/download/auto-detect-tool

  • How to totally close a running LabVIEW Applicatio​n

    Hello NG,
    I have a little problem closing a running LabVIEW Application. For
    example I run 2 Applications in parallel. I would like to totally close
    one of them. If I use the "Exit LabVIEW" VI both Applications will be
    shut down. If I only stop the Application, the not running Front Panel
    is still available. How could I close an Application like a normal
    Windows program?
    Thanks a lot for your help.
    Best regards,
    Michael

    If you build both applications into seperate executables, I believe Exit LabVIEW should only affect the one where it was run.
    If these are 2 VIs running inside LV, you can wire F into FP.Open property of the top level VI. Once the FP of the top level VI closes, the entire hierarchy will be closed as well. This also works with the RTE.
    To do this, you need to create a property node (Application Control palette), right click it and select the VI class and select the property.
    The other option (basically the same thing) is to use the invoke node with the Close FP method.
    Try to take over the world!

  • Labview app wont run on fresh reboot unless MAX is started.

    I am a Labview NOOB. I am the only IT here and started about a year ago and basically got thrown into the "labview" with 0 labview experience.I had to take an xp machine and turn it into a win 7 machine.
    Here's some specs: labview 8.2 32bit running on windows 7 32 bit with IO libraries 16. Driving a gpip to usb 34970A data aquisition unit and a temperature compensation oven. Heres the situation. When i restart the PC my "temp_comp.exe"(application that labview consultant wrote) will not run. I get a few errors One as soon as i start the app: "oven Communication Fault" and one when i try to run the oven with shortened testing times and temp:
    error 107387202 occurred at visa close in HP34970A close.vi-
    34970A_read.vi>measure oven temp.vi->wait for oven to reach temp vi-
    a comp loop.vi - a test loop sequence.vi>main temp comp.vi
    Possible reasons VISA: hex 0xbfff009e a code library required by VISA could not be located or loaded.
    I have reformatted a machine with xp and was able to get this running fine.
    So here's the kicker. If i open up MAX and expand the devices and interfaces tree the program works fine and dandy. no errors. I have ran 3 batches in the oven over night with no problems. I figured i would just do an easy work around and have the max program start during startup but i have to manually expand the devices and interfaces tree before it will work.
    Any ideas will be super helpfull Cheers!
    Solved!
    Go to Solution.

    It never ceases to amaze me what managers think is possible.  It would be difficult for even an experienced LabVIEW programmer to port a LabVIEW app from XP to Windows 7 using a version of LabVIEW not supported on the operating system.  Tell them you'll see them in a few months.
    I ran into an issue once where a vendor's Win7 dll had different default settings than the priginal and we couldn't figure out why we couldn't communicate with the I/O card.  Seems that they inverted the address bits as default.  Of course, there was no documantation on the change - unless you count the source code itself.
    It was an intentional change which would make sense if you were someone who bought a new card and never used the old dll before.  But guess what?  The card was already obsolte/unsupported, so there AREN'T GOING TO BE ANY NEW USERS!
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • Error Code 37 running labview 6 with windows XP

    I've checked most of the posts concerning this Generic error code 37. Here is my dilemma..Currently running Labview 6 on a windows NT system. That computer is on its last legs and we want to upgrade to XP...I installed labview 6 on an XP machine and the program runs fine..and I actually get data from my external device except I get the ERROR 37...The big thing is I cannot run a SUBVI that creates a linear fit because once I get the error 37, the SUBVI stops. I can't understand how I can read data from my external device, yet get the device not found msg. I've even tried installing LV 7, and LV 8 yet get the same results.
    Solved!
    Go to Solution.

    Thanks for the information...Unfortunately I tried all the suggestions and still no luck. The weird thing is I can get individual data from the analog device to output from the VI (i get actual data to show where it is supposed to show in the output boxes), yet I still get the "ERROR 37" message. The one big problem is that I cannot standardize the device through the LV program and therefore the individual data is not calibrated properly. In the standardize VI, the programs runs through a series of samples, and creates a calibration curve. Then when we run individual analyses the calibration curve is used. The problem that occurs in the standardize VI is that the program doesn't advance past the first sample (error 37)so I cannot generate the calibration curve.
    All of the suggestions are greatly aprreciated. What I really do not understand is that without changing anything (just copying files from one computer to another) how the error code comes about. One thing I am going to try over the weekend is to add another COMM port and see what happens.
    This may seem ignorant, but How do you "CLOSE" a COMM port???

  • Is it possible to run LabVIEW 7.1 and 8.5 under the same Windows installation?

    We have an older version of LabVIEW (7.1) which includes functionality for Event Notifications and the base version of LV8.3, which does not seem to contain this functionality. 
    Is it possible to run both of these from the same Windows Installation?  If not I plan to create a new partition and a new Windows installation just to accomodate the two of them.

    Something else to consider is windows compatibility. If you are running LabVIEW on Vista, I would highly discourage installation of Lv 7.1 and 8.5 on the same machine (even if they were different partitions), since there are some significant issues in terms harware compatibility.I am running windows 7.1 and 8.2.1 on a test station with no problems, but the OS is Win XP. My biggest gripe about the dual software system is when a v 7.1 files is opened up by 8.2.1. There is not a system to prevent it from happening, and once we accidentally save a 7.1 app in 8.2,1, going back to 7.1 is a big headache.  

  • Run labview exe in other way than runtime engine?

    Hi guys
    This might be stupid question, but can I run labview's *.exe in other way than in the runtime engine? In these days in have done *exe and installer with runtime engine and give it to the end-user. It does not matter how tiny ur code is, user have to install 40 conponents and then restart computer... How annoying. Is there eny other way? Can i use other programming languages some how?
    -AA-

    If the runtime is only one out of 40 components, it should not make a big difference for you.
    I always tell my users to download and install the runtime engine directly from NI. This needs to be done only once per PC and per runtime version, at which point you can distribute a small installer.
    There is also an idea to simplify all this. Please support it.
    (It is not reasonable to be able to build an executable with embedded runtime, that would make a LabVIEW 2009 executable 100+MB in size. (We had that back in LabVIEW 4.0, where each 20kb VI turned into a 3+MB executable, which was significant in the days of 1GB drives.)
    Message Edited by altenbach on 12-16-2009 11:42 AM
    LabVIEW Champion . Do more with less code and in less time .

  • Run LabVIEW exe in notification tray

    How would I run a labview program in the notification tray without having a main icon open in the task bar. The program would just be placed in the startup folder and operate solely from the notification tray?
    Paul Power
    I have not lost my mind, it's backed up on a disk somewhere

    Here's another implementation that I use and like.
    http://lavag.org/topic/14060-put-your-labview-in-the-tray-once-and-for-all/
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Computer running LabView loses time

    Running LabView VI on HP Brio pc
    Computer clock loses time non-linearly
    e.g. after 24 hours lost 5 mins, after 36
    lost 20mins. Time stamped log file is therefore wrong.
    Happens with both Win95 or Win98 OS but worse on Win95.
    The VI is reading data from instruments on serial port
    and also a GPIB interface. Very slow
    logging though (1 reading/min over many days).
    Does this look like a hardware or software issue? Has anyone ever experienced this?
    Help appreciated

    Mine does too - and I can loose an hour in a day! I posted it on
    a microsoft newsgroup and they explained that it was my problem,
    my application was too cpu bound to service the time interupt
    requests. There is no need to reset the time, just reboot. Windows
    it seems only reads the time from the BIOS once at startup.
    Call it a feature...?
    I call it a bug!
    "Mark Hanning-Lee" wrote in message news:[email protected]...
    > GP wrote:
    > >
    > > Running LabView VI on HP Brio pc
    > > Computer clock loses time non-linearly
    > > e.g. after 24 hours lost 5 mins, after 36
    > > lost 20mins. Time stamped log file is therefore wrong.
    > > Happens with both Win95 or Win98 OS but worse on Win95.
    > > The VI is reading data from instruments on serial port
    > > and also a GPIB interface. Very slow
    > > logging though (1 reading/min over many days).
    > > Does this look like a hardware or software issue? Has anyone ever
    > > experienced this?
    >
    > A general points:
    >
    > Win98 tends to be worse at this than other OS; not just a LabVIEW issue.
    > My Win98 PC used to lose minutes per day; my Win2000 PC loses only a few
    > ms per day.
    >
    > Make SURE that every loop in your code has a Wait or Wait until next ms
    > Multiple. That frees the CPU.
    >
    > If a problem gets worse with time, see whether your memory usage is
    > growing with time.
    > If so, look for Build Array that is running in a loop, causing a large
    > array to grow without limits.
    >
    > Also make sure there is a Close function for every Open.
    > Make sure that you aren't opening & closing inside a loop; correct
    > behavior is to Open before a loop, Read and/or Write inside the loop, &
    > Close at the end.
    > That's true for serial i/o, for VISA, and for GPIB.
    >
    > Lastly, if you are now using classic GPIB & serial functions, consider
    > switching to VISA. Or vice versa!
    >
    > In general, you can keep the clock sync'd by running the free Dimension
    > 4 software from www.thinkman.com . That sets the PC clock at regular
    > intervals so it stays more or less on time.
    > (But I'd be reluctant to do that when the program is running; might mess
    > up loop timing.)
    >
    > Mark

Maybe you are looking for

  • More than one version on java installed?

    I am having difficulty running a simple 'hello world' program on my machine. I have installed jdk1.3 and I can compile a .java file with no errors but when I try to run it I get the following error: Exception in thread "main" java.lang.NoClassDefFoun

  • Implemention of IFRS on New G/L

    Hello, We are planning to implement IFRS with New G/L. what would be the guidelines to do it? I was reading that recommendation is: 1. Migration of New G/L 2. Implementation of IFRS (why?) Can I migrate previous fiscal year to make a comparation with

  • How to parameter Target System in eCATT

    Dear all, I would like to know if it is possible to have the Target System in the eCATT editor to parameterize them like the interfaces? In fact from solution manager I have to run a business scenario in diffrent satellite systems with RFC connection

  • Problems with airtunes

    i use my macbook pro to stream music via my airport express, which is connected to my stereo via a standard audio cable. when i do this, the sound comes out of only one speaker, and very faint out of the other speaker. nothing is wrong with my receiv

  • Lost some calendar info when swithing to icloud

    when swithing to icloud and mountain lion OSX,we lost calendar info,not all but some info.strange and cannot/need help retreving.thanks