How to execute a frame of a flat sequence structure for a specified amount of time?
Hello,
I have a timed loop measuring a resistance value every 2 seconds. I would like to have this timed loop execute for a specified amount of time (e.g. 5 minutes). The timed loop itself is placed within a flat sequence structure so I am concerned that the measurement will be taken once and the next frame will begin to execute, without waiting 2 seconds for a successive reading (and not looping for, say, 5 minutes).
In other words, is it possible to have a frame of a flat sequence structure execute for a specified amount of time before moving onto the next frame?
Thanks for your assistance!
JFK_Aero
Solved!
Go to Solution.
All code in one sequence frame must complete before the next frame can execute. So as long as your timed loop is setup correctly, the next frame cannot run until your 5 minutes is up (N = 5 minutes/2 seconds/measurement = 150 measurements).
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Similar Messages
-
I want to insert a pdf created from a ppt slide into a FCP X project that will run as a PIP for a specified amount of time. I was successful in bringing the image into the project as a clip but the default for the image is one second. When I try to change duration of the clip, I am able to enter a new time length but the actual clip doesn't change.
You select the PDF image in the timeline. You use Control-D and enter the new duration. What happens?
-
Hello,
I'm using labview 2012 and am trying to turn on a signal for a specified length of time in labview at the press of a button. The signal goes into an AO (PXI 6723) through my system, where the voltage gets divided by 2, the read in through the AI (PXI 6225). I want to write and read voltage constantly and then have a spike of voltage after pressing a button in LabView while still reading the voltage value for the specified amount of time.
Parameters:
constant voltage of 1 volt to Analog output (reading and writing) seen through a waveform chart.
for 1 second, turn on 3 volts and see the response on the waveform chart.
My specified delay time does not match the elapsed time. I am having difficulties doing this. I have attached the VI.
( I can't upload a functional VI since it shows "the contents of the attachment doesn't match its file type") How can I attach the VI?.
Thanks!
EduardoMike,
Thank you for your reply! I greatly appreciate it. I currently don't have any DAQmx timing in my application. I tried using it and, without really understanding how it works nor how to manipulate it, the whole test end up taking a long time to change the values i.e. too slow.
The DAQmx timing I used was the sample clock since it was for analog signals, but I don't really understand the buffer, what that means nor how to use it. inputting a rate time for it also made my test slower. The rate time is the samples per channel per second, but I'm not sure how to determine a number so that I am collecting the data I need and take into account aliasing.
I know the PXI 6225 has the capability to read 250kS/s (which I am assuming it's kilosamples per second or 250,000 samples per second). I am using 32 differential channels. I have read that I have to divide the maximum sample rate by the number of channels, (250kS/s / channels) but I don't know if I should count the number of total channels (64) or differential channels(32). In other words, is the per-channel maximum rate:
250,000/32 = 7,812.5 samples per channel per second, or
250,000/64 =3,906.25 samples per channel per second
Furthermore, If I know the number of samples per channel per second, how can I implement that knowledge to the DAQmx sample clock so that my sampling is as fast and as accurate as it can be?
I attached an image of my DAQmx functions in my code, I merged all the stacked sequence structures in paint so you can see them.
thanks for your help!
Eduardo
Attachments:
DAQmx tasks.jpg 211 KB -
How to break a flat sequence structure ...??
How to break a flat sequence structure into two flat sequences structures......i am a student learning labview....help me..
To accomplish what you want you need to basically write some really ugly code. This is a side effect of using the flat sequence structure in the first place. This is exactly why they are not recommended.
First and foremost you will need to place your frame structure inside a loop. This will control how many times you execute the code.
Now you have a few alternatives to skip the first three steps which are kludging but time is of the essence.
1. Place a case structure around the code within the first three frames. Each frame will have a case structure. You can use the loop count to control only executing the code the first time through the loop.
2. You could combone the code of the first three frames into a single subVI and then use the same approach described above to skip executing that subVI.
Mark Yedinak
"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot -
Measure the time in a specific frame of a flat sequence
Hi I have a labVIEW program with a flat sequence and I would like to stick in a small SubVI which measures how long it stays within an individual frame to confirm the delay I have used. Does anyone have any code or any tips on what I could add which sets a timer going when I enter the frame and spits out the answer to a numeric indicator when it goes to the next frame.
Any help would be appreciatedsrikrishnaNF wrote:
hi mr_nice,
Use time elapsed vi...
Thanks and regards,
srikrishnaNF
Please add where you find this vi.
Check out this video here. It might be useful for you when he talks about the flat sequence structure and how to get elapsed time from it. It starts at about 7 minutes into the movie. He's using Tick Count.
Also here you can find useful information
Regards,
Even
Certified LabVIEW Associate Developer
Automated Test Developer
Topro AS
Norway -
How do I set my mail folders to keep mail saved there available indefinitely while only keeping active mail in my mailbox for a specified period of time?
There is no time limit in Firefox 4+ versions for the history.<br />
Firefox determines automatically how many pages can be kept without affecting the performance.<br />
You can see the current value via the reads-only pref places.history.expiration.transient_max_pages on the about:config page.
See:
* http://blog.bonardo.net/2010/01/20/places-got-async-expiration
If you lose the history then make sure that you do not use Clear Recent History to clear the browsing history.<br />
Also make sure that you do not have cleanup software that might clean up files in the Firefox Profile Folder.
*http://kb.mozillazine.org/Profile_folder_-_Firefox
*Firefox > Preferences > Privacy : History: [X] Clear history when Firefox closes > Settings
*https://support.mozilla.org/kb/Clear+Recent+History -
How to turn on Flat Sequence Structure based on a Boolean input?
Hello,
I trying to write a VI ( attached) that will sample an analog voltage coming through a an analog MUX. I using a flat sequance structure to change the select signals outputs to change the channel being sampled. I am wondering if I can turn on the structure only when my Sample boolean input is TRUE?
Solved!
Go to Solution.
Attachments:
Analog MUX.vi 52 KB
Analog MUX VI.JPG 87 KBmalbaloo wrote:
Thanks to your comment, I realized that this VI will not do what I want. What I want is this:
if (sample is true)
output=00
take a sample
then:
output=01
take a sample
then:
output=10
take a sample
Any Idea on how to implement this?
That sounds like a simple FOR loop with Set Output and Take Sample inside, autoindexing on the output value.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines -
How to execute Update Module FM after final commit work for a T-code.
Hello Folks,
I have a bit complex issue with my current object.
We have modified MM41/MM42 transactions and added a subscreen to fulfill the requirement.
We have designed the subscreen and embedded the same to MM41/MM42 through SPRO configuration.
Now for update business logic,i am trying to execute one Function module(Update Module) in update Task...so that it will be executed once after the final commit work will be done for MM41/MM42.
But its not executing.
To fulfill my requirement i need to execute the FM only after Final Commit work for MM41/MM42.
Please suggest in this regard.
Even i can see few BADI's which are triggering through MM01/MM02 but not through MM41/MM42.
BADI_ARTICLE_REF_RT
BADI_MATERIAL_CHECK
BADI_MAT_F_SPEC_SEL
Code with which i am trying is given below.
After PAI event of the subscreen---
1: MODULE USER_COMMAND_9001.
2: MODULE user_command_9001 INPUT.
PERFORM sub_save_mara ON COMMIT.
ENDMODULE.
3: FORM sub_save_mara.
CALL FUNCTION 'ZMMUPDATE_MARA_APPEND_STRUCT' "IN UPDATE TASK
EXPORTING
materialno = gv_matnr
appendmara = ty_zzmara.
ENDFORM. "sub_save_mara
4: FUNCTION zmmupdate_mara_append_struct.
""Update Function Module:
""Local Interface:
*" IMPORTING
*" VALUE(MATERIALNO) TYPE MATNR
*" VALUE(APPENDMARA) TYPE ZZMARA
Data Declaration for Local use
DATA : w_mara TYPE mara.
Selecting the latest values for the material.
SELECT SINGLE * FROM mara INTO w_mara WHERE matnr = materialno.
IF sy-subrc = 0.
Move the ZZMARA values to structure MARA
MOVE-CORRESPONDING appendmara TO w_mara.
Update the values in table MARA.
MODIFY mara FROM w_mara.
ENDIF.
ENDFUNCTION.
Kindly suggest.Thanks in advance.
Regards
AnsumeshHi..
The code given by me will work fine provided the Final commit should happen.
Because to execute FM with update task,final commit work should happen which is mandatory and after that it will call the update task.
In my case final commit work was not happeneing because..SAP standard program was not able to detect wether there is any change in my sub-screen or not as the standard program & my custom program,subscreens are different.
As it was not able to detect the change,so final commit was not happening and hence update task also.
To provide the reference of change in my subscreen to standard program ,i set a flag as per the change in the subscreen
And exported the same to memory.
Then Implemented one enhacement spot in MATERIAL_CHANGE_CHECK_RETAIL Fm where i have Imported the flag value.
Based on my custom flag value,i have set one standard flag FLG_AENDERUNG_GES which tells SAP standard program for MM42 wether any change has happened or not.
The above solved my purpose.
Regards
Ansumesh -
How to save 7.0 VI's flat sequences properly as Labview version 6.1
Labview 7.0 has a Save for previous option that allows the vi to be saved as 6.1 vi. In attempt to
do that with a VI that has flat sequence, a stacked sequence got added in the VI and a lot of things
got screwed up. Is there anything out that that will allow me not to happen, rather than manually change
the whole VI, which is going to be very time consuming?
Any help will be greatly appreciated.
RatinSince LV 6 does not support a flat sequence, I'm afraid you are stuck with making the modifications yourself. Have you tried going to the 7.0 block diagram, right clicking on the flat sequence, and selecting Replace with Stacked Sequence? If this is successful, then you could save to previous version.
- tbob
Inventor of the WORM Global -
How To Execute an Oracle 10g SProc using VS 2005, for Reporting Services
Good day! :-)
Anybody who knows the syntax for executing an Oracle Stored Proc thru ODBC connection using VS 2005 for Reporting Services? I am having a problem about this.
I am using the ODBC connection because VS 2005 does not support Oracle Database 10g in its Oracle Database Connection feature (only 7.3, 8i, and 9i), that's y.
While using MS SQL Server 2000, I never encountered any problem. But using Oracle Database 10g, I find it hard to call the stored procedures, an error is generated everytime.
Please click the link below for the screenshots:
http://www.geocities.com/vrcode2/oraError.JPG
http://www.geocities.com/vrcode2/storedProc.JPG
Please help...thank you so much.
FrancisI'll give you updates about the use of the MS SQL Server Reporting Services with VS 2005 and Oracle, this might be helpful for those who will encounter this same ctuation in the future.
I have discovered that if you're going to connect thru ODBC, even if the connection is successful, the user is still prompted to input a password, which should not be the case when using the Reporting Services. Another thing to take note is the issue about REF CURSOR, we're going to have problems with this. And also the syntax on how you're going to call the stored procedures (with or without input parameters).
With modifications made through Oracle Net Manager, and I tried AGAIN connecting through "Oracle (client)" feature of VS 2005 (even if the list only include Oracle 7.3, 8i, and 9i that are supported) with some changes also, you'd still be able to generate correct data with that solution. If the configuration is correct, you just need to call the stored procedure (with or without input parameter), you won't have any problems about the correct syntax.
I suppose VS 2005 was released earlier than Oracle 10g, that's why 10g wasn't included If ever u'd encounter the same ctuation like mine, and u need the details on how to connect, do not hesitate to ask me. -
How to execute a loop for a user specified amount of time
This seems like it should be a no brainer. But I can't figure it out. What's the best way to execute a loop for a user specified number of seconds?
You can use the Elapsed Time Express VI (available in LabVIEW 7.0 and later). I have attached a sample VI saved in LabVIEW 7.1 format that shows how to use this Express VI.
Good luck,
-D
Darren Nattinger, CLA
LabVIEW Artisan and Nugget Penman
Attachments:
Elapsed_Time.vi 71 KB -
How to play movie clips for a certain amount of time only
Hello everyone, I think I have a relatively basic question here but I can't figure it out. I have a movie clip loaded using action script 3 at the start of my animation, I want ito to end at the 120th frame. But I can't use the stop(); command because it will also stop the rest of my animations from the 121st frame onwards. So my problem is, how can I stop the movie clip without stopping the rest of my animations?
Thank you in advance!I don't think I have codes that load the swf, but I've sent you the code that I would like to stop. Thanks!
-
How do I make a program wait for a set amount of time?
Basically, I want there to be some amount of lag after a repaint, so how do I do that? I want it to wait a fifth of a second, basically. Is there a quick way to do this?
By the way, the program is not running on a timer, so I can't just have the timer stop.didn't see that:
you need to use a thread
public class Something implements Runnable
Thread t;
public Something()
t = new Thread(this);
t.start();
public void run()
while(true)
//your stuff goes here
try
t.sleep(200);
} catch(InterruptedException exc) { ; } -
How to make an ABAP program run for a specified number of times ?
assalamoalikum all!!!
Can some 1 plz tell me that How can I make my ABAP program run ONLY for 2 times (after it went in production etc)
AND when the program runs for 2 times It then gets hanged/Locked foreever.
Suppose my program is:
REPORT twice002.
write ' I will run only twice bye bye'.Well, I guess the only full proof way is to create a custom "Z" table which will hold the counter, in your program you would update this table every time the program runs. In this same program before updating the counter, you would retrieve the counter and check if it is = 2, if so, then write a message and RETURN.
Regards,
Rich Heilman -
How to reate with TC XSLT_TOOL SEPA CT XML structure for Italy?
Hi gurus,
I'm running ECC 5.00 on support package 10, no SEPA notes can be implemented for this release.
I'm then creating a custom program in order to manage the creation of the XML file using XSLT_TOOL according to SEPA CT tree.
Have you any suggestion on how to proceed?
Thanks
Riccardo F.Dear Pallavi,
Very useful post!
I am looking for similar accelerators for
Software Inventory Accelerator
Hardware Inventory Accelerator
Interfaces Inventory
Customization Assessment Accelerator
Sizing Tool
Which helps us to come up with the relevant Bill of Matetials for every area mentioned above, and the ones which I dont know...
Request help on such accelerators... Any clues?
Any reply, help is highly appreciated.
Regards
Manish Madhav
Maybe you are looking for
-
How a drop out made $5000 in 30 days with $10 using this system
NOTE: PLEASE COPY THE WHOLE OF THIS AND SAVE IT ANYWHERE, THIS IS REAL AND SERIOUS. How to convert $10 to $15000 in 30 days only as easy as possible. TURN $10 INTO $15,000 IN ONLY 30 DAYS...HERE IS HOW! This is a Money Scheme and Not, I repeat... Thi
-
Capital Goods partial Rejection
Dear Sir, We have a scenario say , we place a PO for the purchase of Capital Nature for Item say Motor of 2 numbers . We did the GR for 2 numbers . Subsequently during the Inspection , 1 number Motor got rejected . We want to do UD for 1 number accep
-
What trusted web sites do you use that have free or purchase photoshop brushes?
What trusted web sites do you use that have free or purchase photoshop brushes?
-
My iPod touch told me to connect to iTunes because it was disabled, but when I plugged it in, it said that there was a passcode that was needed to be unlocked. But I cant unlock it because it is disabled. What do I do?
-
hello all, I am writing a simple servlet which will extract data (empno and empname) from a html form and insert in to database. everything seems to work fine except it inserts in to the table empno and empname as it is without values. if u can think