freemason Posted January 16, 2009 Author Report Share Posted January 16, 2009 Hello ppl, need some help!! please see attached if this is not clear ( 0)----8hrs--------(8)-------8hrs-------(16)--------8hrs------(24)--------upto 14 days 30secs-----------30secs---------------30sec----------------30sec-----------of data @ each 8hr interval every 8hrs i need to able to write up 30secs of data to spreadsheet and continue the operation until the end of expt (14 days), also optionally i should be able to write some 45 sec of data between the 8hrs gap without interrupting the original interval setup I was trying with 2 elapsed time vis, one countsdown 8hrs ,when elapses it should trigger another 30 sec timer which will enable those 30s of of writing and stop.again when 8hrs elapses it should write 30 seconds.( it should not stop, it should reset again and wait for the 8hr timer to set it) but i am very much stuck with these timers, another types or ideas welcome any help would be much appreciated thanks, free mason Quote Link to comment
freemason Posted January 16, 2009 Report Share Posted January 16, 2009 Hello ppl, need some help!! please see attached if this is not clear ( 0)----8hrs--------(8)-------8hrs-------(16)--------8hrs------(24)--------upto 14 days 30secs-----------30secs---------------30sec----------------30sec-----------of data @ each 8hr interval every 8hrs i need to able to write up 30secs of data to spreadsheet and continue the operation until the end of expt (14 days), also optionally i should be able to write some 45 sec of data between the 8hrs gap without interrupting the original interval setup I was trying with 2 elapsed time vis, one countsdown 8hrs ,when elapses it should trigger another 30 sec timer which will enable those 30s of of writing and stop.again when 8hrs elapses it should write 30 seconds.( it should not stop, it should reset again and wait for the 8hr timer to set it) but i am very much stuck with these timers, another types or ideas welcome any help would be much appreciated thanks, free mason Quote Link to comment
jcarmody Posted January 16, 2009 Report Share Posted January 16, 2009 QUOTE (freemason @ Jan 14 2009, 10:38 PM) any help would be much appreciated Let me take this opportunity to introduce you to the http://jkisoft.com/state-machine/' rel='nofollow' target="_blank">JKI State Machine. It's worth your while to learn. I've attached something for you to start with. If you like it, take the time to watch the videos on JKI's site, read whatever you can find on the forum and post back here if you have any trouble filling it out for your application. If you don't like it ( ), post your code here and we'll see what we can do to help you. </jim> Quote Link to comment
jcarmody Posted January 16, 2009 Report Share Posted January 16, 2009 QUOTE (freemason @ Jan 14 2009, 10:38 PM) any help would be much appreciated Let me take this opportunity to introduce you to the http://jkisoft.com/state-machine/' rel='nofollow' target="_blank">JKI State Machine. It's worth your while to learn. I've attached something for you to start with. If you like it, take the time to watch the videos on JKI's site, read whatever you can find on the forum and post back here if you have any trouble filling it out for your application. If you don't like it ( ), post your code here and we'll see what we can do to help you. </jim> Quote Link to comment
freemason Posted January 16, 2009 Author Report Share Posted January 16, 2009 Thanks for the reply, i will need more time to learn jki state machine, but for now its kind of urgent so, im attaching my vi , please help!! I am using 2 elapsed time vis ideas: 1) I can use a case structure but the 8hrs timer gives out a boolean only when elapsed and instantly changes to false, if some how i can make that boolean to be true for 30 secs and do my operation and change back to false while the 8hrs timer resets at its time 2) I can use the get start time of hrs timer and add 30 sec to it and give it to 30 sec timer's "set start time " and do my operation within that 30 secs and wait for 8hrs again but, i am unable to do any of these may be because both are in the same while loop or something, even if put a while loop around the 30 sec timer and stop the loop when time up, its not working, it still resets, i need something that can start a while loop (programatically) not when we press the run button, 3) if we make the 30 sec timer a subvi and put in a case structure and contol its running/run button... 4) if you can give me in a standard state machine i guess i can understand, but im thinking if the 8hrs elapsed it will wait for the 30 sec thing to happen and then start 8hrs again, but i need to run that 8 hrs,8hrs,8hrs silently in the background and do 30 sec thing simultaneously, not wait for 30 secs any help would be much appreciated??? thanks Quote Link to comment
freemason Posted January 16, 2009 Author Report Share Posted January 16, 2009 Thanks for the reply, i will need more time to learn jki state machine, but for now its kind of urgent so, im attaching my vi , please help!! I am using 2 elapsed time vis ideas: 1) I can use a case structure but the 8hrs timer gives out a boolean only when elapsed and instantly changes to false, if some how i can make that boolean to be true for 30 secs and do my operation and change back to false while the 8hrs timer resets at its time 2) I can use the get start time of hrs timer and add 30 sec to it and give it to 30 sec timer's "set start time " and do my operation within that 30 secs and wait for 8hrs again but, i am unable to do any of these may be because both are in the same while loop or something, even if put a while loop around the 30 sec timer and stop the loop when time up, its not working, it still resets, i need something that can start a while loop (programatically) not when we press the run button, 3) if we make the 30 sec timer a subvi and put in a case structure and contol its running/run button... 4) if you can give me in a standard state machine i guess i can understand, but im thinking if the 8hrs elapsed it will wait for the 30 sec thing to happen and then start 8hrs again, but i need to run that 8 hrs,8hrs,8hrs silently in the background and do 30 sec thing simultaneously, not wait for 30 secs any help would be much appreciated??? thanks Quote Link to comment
Anders Björk Posted January 17, 2009 Report Share Posted January 17, 2009 QUOTE (freemason @ Jan 15 2009, 09:19 PM) Thanks for the reply, i will need more time to learn jki state machine, but for now its kind of urgent so, im attaching my vi , please help!!I am using 2 elapsed time vis ideas: 1) I can use a case structure but the 8hrs timer gives out a boolean only when elapsed and instantly changes to false, if some how i can make that boolean to be true for 30 secs and do my operation and change back to false while the 8hrs timer resets at its time 2) I can use the get start time of hrs timer and add 30 sec to it and give it to 30 sec timer's "set start time " and do my operation within that 30 secs and wait for 8hrs again but, i am unable to do any of these may be because both are in the same while loop or something, even if put a while loop around the 30 sec timer and stop the loop when time up, its not working, it still resets, i need something that can start a while loop (programatically) not when we press the run button, 3) if we make the 30 sec timer a subvi and put in a case structure and contol its running/run button... 4) if you can give me in a standard state machine i guess i can understand, but im thinking if the 8hrs elapsed it will wait for the 30 sec thing to happen and then start 8hrs again, but i need to run that 8 hrs,8hrs,8hrs silently in the background and do 30 sec thing simultaneously, not wait for 30 secs any help would be much appreciated??? thanks http://lavag.org/old_files/monthly_01_2009/post-5713-1232101435.jpg' target="_blank"> Something like this, maybe I guess it could be made simpler and better than this but this seem to work. Quote Link to comment
Anders Björk Posted January 17, 2009 Report Share Posted January 17, 2009 QUOTE (freemason @ Jan 15 2009, 09:19 PM) Thanks for the reply, i will need more time to learn jki state machine, but for now its kind of urgent so, im attaching my vi , please help!!I am using 2 elapsed time vis ideas: 1) I can use a case structure but the 8hrs timer gives out a boolean only when elapsed and instantly changes to false, if some how i can make that boolean to be true for 30 secs and do my operation and change back to false while the 8hrs timer resets at its time 2) I can use the get start time of hrs timer and add 30 sec to it and give it to 30 sec timer's "set start time " and do my operation within that 30 secs and wait for 8hrs again but, i am unable to do any of these may be because both are in the same while loop or something, even if put a while loop around the 30 sec timer and stop the loop when time up, its not working, it still resets, i need something that can start a while loop (programatically) not when we press the run button, 3) if we make the 30 sec timer a subvi and put in a case structure and contol its running/run button... 4) if you can give me in a standard state machine i guess i can understand, but im thinking if the 8hrs elapsed it will wait for the 30 sec thing to happen and then start 8hrs again, but i need to run that 8 hrs,8hrs,8hrs silently in the background and do 30 sec thing simultaneously, not wait for 30 secs any help would be much appreciated??? thanks http://lavag.org/old_files/monthly_01_2009/post-5713-1232101435.jpg' target="_blank"> Something like this, maybe I guess it could be made simpler and better than this but this seem to work. Quote Link to comment
jcarmody Posted January 17, 2009 Report Share Posted January 17, 2009 Here's your code, slightly modified. You were so close! I added a delay (to stop hogging the CPU) I added a Case Structure and a Shift Register (to control when the 30 second timer operates) I deleted your wire between Get Start Time and Set Start Time I changed the Boolean control to a constant to Auto Reset the first timer I added a First Call to the test so you'd get your measurement at T=0 You'll also need to multiply your "at every" control by 3600 to get the first timer to run for hours instead of seconds. Jim Quote Link to comment
jcarmody Posted January 17, 2009 Report Share Posted January 17, 2009 Here's your code, slightly modified. You were so close! I added a delay (to stop hogging the CPU) I added a Case Structure and a Shift Register (to control when the 30 second timer operates) I deleted your wire between Get Start Time and Set Start Time I changed the Boolean control to a constant to Auto Reset the first timer I added a First Call to the test so you'd get your measurement at T=0 You'll also need to multiply your "at every" control by 3600 to get the first timer to run for hours instead of seconds. Jim Quote Link to comment
freemason Posted January 17, 2009 Author Report Share Posted January 17, 2009 thank you so much this works perfectly, I was close, I wish I knew how to do it. :headbang: this is the 1st time I ever posted anything on forums and it really works great because of people like you u got my kudos on NI forum :thumbup: thanks Quote Link to comment
freemason Posted January 17, 2009 Author Report Share Posted January 17, 2009 thank you so much this works perfectly, I was close, I wish I knew how to do it. :headbang: this is the 1st time I ever posted anything on forums and it really works great because of people like you u got my kudos on NI forum :thumbup: thanks Quote Link to comment
jcarmody Posted January 20, 2009 Report Share Posted January 20, 2009 QUOTE (freemason @ Jan 16 2009, 03:18 PM) thank you so muchYou're welcome. Keep coming back!QUOTE I was close, I wish I knew how to do it. Were you able to figure out what I did, or do you still have questions? Quote Link to comment
jimmyinct Posted January 27, 2009 Report Share Posted January 27, 2009 can someone save that last jcarmody file as labview 8.5. I would like to see it.. Quote Link to comment
freemason Posted January 27, 2009 Author Report Share Posted January 27, 2009 here QUOTE (jimmyinct @ Jan 26 2009, 12:48 PM) can someone save that last jcarmody file as labview 8.5.I would like to see it.. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.