Elapsed time beginner
hello guys ,
I need ur help ..
I have a really simple task to do : i need to push a button , and after 15 second , a LED should turn on
I've been looking in the forum for such questions , but all of them are advanced or using another version which i can't open !
However i've seen that almost everybody are using the elapsed time block , So if you can please tell me how should i connect this block to my circuit .
Regards ,
apok wrote:
pjr1121 wrote:
The simplest way is to use the Wait function, wire 15000 (milliseconds) to it. After it is completed, set the LED value to true. To ensure that the LED happens after the wait function, use a sequence structure.
There are better ways to create delays but this will be sufficient for what your asking.
i wouldnt do that...that will keep anything within the loop from responding to user interface within that time
CLD 7.b.3. Avoid using any of the Wait functions to time a software operation
better to use elapsed time.vi, tick count, time stamp....
You are correct in that it prevents other items from responding and I did say that it was a basic solution. I normally use timestamps for items such as this so the rest of my code keeps running (I don't usually need very precise timing so errors introduced in when the timestamps are checked don't usually matter to me).
Similar Messages
-
How can I make a timer that will record elapsed time up to 15 hours with a PCI-6503E DAQ card?
I'm a beginner LabVIEW programmer, but need to take measurements of elapsed time from the start of data acquisition for up to 15 hours. I'm using a PCI-6503E card. Looking at examples on the web and LabVIEW, itself, I was only able to find a way to take time measurements with a DAQ card up to 167 s, unless two counters were tied together, but there are no instructions on how to do that. Could someone help me? Thanks.
I suggest you to look in the Resouce Library: inside it there is plenty of useful examples.
I found this VI with two cascaded timers in the Measurement hardware > Counter/Timer > Event/Time Measurement cathegory:
http://zone.ni.com/devzone/devzoneweb.nsf/opendoc?openagent&5293158F4EC950C4862568C1005F6CD9&cat=C7029C9ACBD3DF7386256786000F8EE6
Hope this helps.
Roberto
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos? -
Comparing two elapsed timer readings
Hi everyone,
I'm a new user of Labview, so I'm teaching myself as I go along really. I've come up against a problem though. I'm trying to compare two timer readings from elapsed timers. Eventually I am hoping to swap these timers for a pair of light beams inputted through a DAQ chassis. Initially though I wanted to get the content of my program correct, without having to have the equipment connected to my laptop.
I have attached my progress so far, apologies if my query has an obvious solution. As I say I'm a bit of an beginner! How would I take the two elasped timers log the times found off the timers, compare which one has a greater value and consequently start a new timer depending on this. I would then like to log this time in data form.
I've tried to compare the two elasped timers with greater than booleans etc but I cant seem to get it to work?
As I say I hope to use this idea in a time gate sort of application where depending on which light beam is broken first depends on which timer is started. Hope my explanation is clear.
Any help is much appreciated,
Thanks very much!
Attachments:
FYP.vi 15 KBPT-
Looking at your code you have a few problems that you will need to address. Read the LabVIEW help section titled "Caveats and Recommendations when Using Events in LabVIEW." You have some latching booleans controls that are incorrectly placed. The terminals should be in the event case that handles the value change event.
Why two event structures? One structure is a better Idea you can handle all your events with 1 loop (and avoid stopping the loops independantly- this can lead to a condition where the vi becomes unresponsive.
The lower loop compares the start times to two different timestamps. This is introducing potential errors since there is timing relationship between the calls to the system timer. and the lower case structures are rather insane- in english they resolve to "if started return how long its been since started else return 0" Check the NI website there is a CLD practice exam solution (Car Wash) that has a pretty good example and discussion of using the elapsed timer express vi. It might point you in a better direction than where you are going.
Why not use the time terminals in the event structure? thats the time the event fired. But, you might want the time the event was handled I don't Know- (hint-comment your code and write SOMETHING in the vi documentation. Eventually you'll be writing more complex code so start developing good habits now) (good habits--)
Come on back when you've looked at some of the examples and I'ld be glad to help you more.
Jeff -
Elapsed Time in my V$SQL
Hi,
Can someone answer this please?. I'm bit perplexed by the elapsed time in my v$sql
UPDATE ods_router_tables SET last_data_received = :b1, last_data_received_dst = :b3 WHERE
table_name = :b2 AND NVL(last_data_received,TO_DATE('01-JAN-1980','DD-MON-YYYY')) < :b1
Executions: 2786327
Disk reads: 0
Buffer gets: 6023381
Rows processed: 423713
Optimizer cost: 1
Sorts: 0
CPU Time: 898500000
Elapsed Time: 1.84467440681166E19
This table is quite small, only 44 records and if i run the statement in Sql plus, it runs in a
flash. But why this enormous Elapsed time in V$SQL. Is my conversion of this time to
seconds/execution correct?
Elapsed time in seconds/execution: 1.84467440681166E19/1000000/2786327=6620451 seconds!
I guess there is something seriously wrong here. I'm running on a 4 CPU server. DB version is 9.2.
I see similar figures in some of the innocent looking Insert statements as well.
thanks in advance,
SunilELAPSED_TIME in v$sql also includes all wait times for that sql. Is it possible that update is waiting for locks some time? See the following case.
SQL> create table test2 as select * from dual;
Table created.
SQL> update test2 set dummy='A';
1 row updated.From another session try to update the same row.
SQL> update test2 set dummy='B';Wait for some time. Then rollback the first session.
SQL> rollback;
Rollback complete.Now look at v$sql.
SQL> select sql_text,executions,elapsed_time from v$sql where sql_text like 'update%test2%';
SQL_TEXT
EXECUTIONS ELAPSED_TIME
update test2 set dummy='B'
1 29413712
update test2 set dummy='A'
1 2506The first update's elapsed time is very small. The second update's elapsed time is high because of the wait for the lock. -
ORA-1555 ORA-3136 errors:: elapsed time vs Query Duration
Dear all,
- My Database version is 11.2.0.2, Solaris.
- We have been having a problem in the production database where the front end nodes start going up and down for couple of hours sometimes. ; When node flapping is going on we get connection timed out alerts.
WARNING: inbound connection timed out (ORA-3136) opiodr aborting
process unknown ospid (4342) as a result of ORA-609 opiodr aborting
process unknown ospid (4532) as a result of ORA-609 opiodr aborting
process unknown ospid (4534) as a result of ORA-609 opiodr aborting....
Since this week node flapping is happening every day. Since past 2 days after or during node flapping we are getting ORA-1555 error.
Extract from alert log error:
ORA-01555 caused by SQL statement below (SQL ID: g8804k5pkmtyt, Query Duration=19443 sec, SCN: 0x0001.07bd90ed):
SELECT d.devId, d.vendor, d.model, d.productClass, d.oui, d.parentDeviceId, d.created, d.lastModified AS devLastMod, d.customerId, d.userKey1, d.userKey2, d.userKey4, d
.userKey5, d.firmwareFamily, d.softwareVer, d.serialNum, d.ip, d.mac, d.userKey3, d.userKey6, d.provisioningId, d.status, d.classification, d.population, d.name, d.ipRe
solver, d.ipExpirationTime, d.geoLocationId,contact.firstContactTime, ifaces.id, ifaces.type AS ifaceType, ifaces.lastModified AS ifaceLastMod, ifaces.timeoutname, ifac
es.username1, ifaces.password1, ifaces.username2, ifaces.password2, ifaces.connReqUrl, ifaces.connReqScheme, ifaces.srvNonce, ifaces.deviceNonce, ifaces.phoneNumber,ifa
ces.bootstrapSecMethod, ifaces.srvAuthentication, ifaces.deviceAuthentication, ifaces.userPIN, ifaces.networkID, ifaces.omaSessionID, ifaces.portNum, ifaces.mgtIp, ifac
es.cmtsIp, ifaces.mgtReadCommunity, ifaces.mgtWriteCommunity, ifaces.cmtsReadCommunity, ifaces.cmtsWriteCommunity, devto.name AS devtoName, devto.rebootTimeout, devto.sessionInitiationI run Statspack report from the whole day duration, and looking into the elapsed time in seconds no more than 3739.61 sec (too lower than run duration in the alert log file of 19443 sec); So I would like to know if there is any co-relations between the ORA-3136 errors and the ORA-1555 errors?
CPU CPU per Elapsd Old
Time (s) Executions Exec (s) %Total Time (s) Buffer Gets Hash Value
tTime <= :3 ) AND (endTime IS NULL OR endTime >= :4 )
2773.77 7,787,914 0.00 3.4 3739.61 112,671,645 1909376826
Module: JDBC Thin Client
SELECT d.devId, d.vendor, d.model, d.productClass, d.oui, d.pare
ntDeviceId, d.created, d.lastModified AS devLastMod, d.customerI
d, d.userKey1, d.userKey2, d.userKey4, d.userKey5, d.firmwareFam
ily, d.softwareVer, d.serialNum, d.ip, d.mac, d.userKey3, d.user
SQL> show parameter UNDO_MANAGEMENT
NAME TYPE VALUE
undo_management string AUTO
SQL> show parameter UNDO_RETENTION
NAME TYPE VALUE
undo_retention integer 10800BR,
DiegoThank you. Please let me know if it is enough or you need more information;
SQL ordered by Gets DB/Inst: DB01/db01 Snaps: 14835-14846
-> End Buffer Gets Threshold: 100000 Total Buffer Gets: 677,689,568
-> Captured SQL accounts for 73.6% of Total Buffer Gets
-> SQL reported below exceeded 1.0% of Total Buffer Gets
CPU Elapsd Old
Buffer Gets Executions Gets per Exec %Total Time (s) Time (s) Hash Value
21,286,248 2,632,793 8.1 3.4 666.73 666.76 3610154549
Module: JDBC Thin Client
SELECT d.devId, d.vendor, d.model, d.productClass, d.oui, d.pare
ntDeviceId, d.created, d.lastModified AS devLastMod, d.customerI
d, d.userKey1, d.userKey2, d.userKey4, d.userKey5, d.firmwareFam
ily, d.softwareVer, d.serialNum, d.ip, d.mac, d.userKey3, d.user
17,029,561 1,176,849 14.5 2.7 417.32 416.73 1909376826
Module: JDBC Thin Client
SELECT d.devId, d.vendor, d.model, d.productClass, d.oui, d.pare
ntDeviceId, d.created, d.lastModified AS devLastMod, d.customerI
d, d.userKey1, d.userKey2, d.userKey4, d.userKey5, d.firmwareFam
ily, d.softwareVer, d.serialNum, d.ip, d.mac, d.userKey3, d.user
17,006,795 37 459,643.1 2.7 367.61 368.95 4045552861
Module: JDBC Thin Client
SELECT d.devId, d.vendor, d.model, d.productClass, d.oui, d.pare
ntDeviceId, d.created, d.lastModified AS devLastMod, d.customerI
d, d.userKey1, d.userKey2, d.userKey4, d.userKey5, d.firmwareFam
ily, d.softwareVer, d.serialNum, d.ip, d.mac, d.userKey3, d.userAnother Statspack report for the whole day shows;
SQL ordered by CPU DB/Inst: DB01/db01 Snaps: 14822-14847
-> Total DB CPU (s): 82,134
-> Captured SQL accounts for 40.9% of Total DB CPU
-> SQL reported below exceeded 1.0% of Total DB CPU
CPU CPU per Elapsd Old
Time (s) Executions Exec (s) %Total Time (s) Buffer Gets Hash Value
tTime <= :3 ) AND (endTime IS NULL OR endTime >= :4 )
2773.77 7,787,914 0.00 3.4 3739.61 112,671,645 1909376826
Module: JDBC Thin Client
SELECT d.devId, d.vendor, d.model, d.productClass, d.oui, d.pare
ntDeviceId, d.created, d.lastModified AS devLastMod, d.customerI
d, d.userKey1, d.userKey2, d.userKey4, d.userKey5, d.firmwareFam
ily, d.softwareVer, d.serialNum, d.ip, d.mac, d.userKey3, d.user
SQL ordered by Gets DB/Inst: DB01/db01 Snaps: 14822-14847
-> End Buffer Gets Threshold: 100000 Total Buffer Gets: 1,416,456,340
-> Captured SQL accounts for 55.8% of Total Buffer Gets
-> SQL reported below exceeded 1.0% of Total Buffer Gets
CPU Elapsd Old
Buffer Gets Executions Gets per Exec %Total Time (s) Time (s) Hash Value
86,354,963 7,834,326 11.0 6.3 2557.34 2604.08 906944860
Module: JDBC Thin Client
SELECT d.devId, d.vendor, d.model, d.productClass, d.oui, d.pare
ntDeviceId, d.created, d.lastModified AS devLastMod, d.customerI
d, d.userKey1, d.userKey2, d.userKey4, d.userKey5, d.firmwareFam
ily, d.softwareVer, d.serialNum, d.ip, d.mac, d.userKey3, d.user
.....BR,
Diego
Edited by: 899660 on 27-ene-2012 7:43
Edited by: 899660 on 27-ene-2012 7:45 -
How can I display the elapsed time of the course using Advanced Actions in Captivate?
I have a Captivate course which is approximately 35 minutes in length. On each slide I would like to display to the user, the current elapsed time.
EXAMPLE:
25/35 minutes complete
The 35 would remain static, so I have been working with the elapsed time system variable in CP: elapsed:$$cpInfoElapsedTimeMS$$
I can't seem to get the variable to properly display the elapsed time in minutes, rather than miliseconds. Attached is a screen shot of my advanced action.
Can anyone provide guidence regarding how I should structure this differntly?I talked about that Timer widget in that blog post and pointed to another one:
http://blog.lilybiri.com/timer-widget-to-stress-your-learners
If you are on CP7, you'll have this widget also as an interaction, which means it is compatible with HTML5 output. Amd there is also an hourglass interaction, with similar functionality but... did not blog about that one
PS: Check Gallery\Widgets to find all widgets. Default path is set to Interactions -
How can I get the elapse time for execution of a Query for a session
Hi ,
How can I get the elapse time for execution of a Query for a session?
Example - I have a report based on the procedure ,when the user execute that it takes say 3 min. to return rows.
Is there any possible way to capture this session info. for this particular execution of query along with it's execution elapse time?
Thanks in advance.Hi
You can use the dbms_utility.get_time tool (gives binary_integer type value).
1/ Initialize you time and date of beginning :
v_beginTime := dbms_utility.get_time ;
2/ Run you procedure...
3/ Get end-time with :
v_endTime := dbms_utility.get_time ;
4/ Thus, calculate elapsed time by difference :
v_elapsTime := v_endTime - v_beginTime ;
This will give you time elapsed in of 100th of seconds...
Then you can format you result to give correct print time.
Hope it will help you.
AL -
How to use elapsed time function with state machine in Lab VIEW
Hello
I've been trying to use state machine with elapsed time function in order to sequentially start and stop my code. The arrangement is to start the code for 1 minute then stop for 5 minutes. I've attached the code, the problem is when I place the elapsed time function out of the while loop it doesn't work, on the other hand when I place it inside the loop it does work but it doesn't give the true signal to move to the next state.
Could you please have a look to my code and help me to solve this issue.
Regards
Rajab
Solved!
Go to Solution.
Attachments:
daq assistance thermocouple(sate machine raj).vi 436 KBRajab84 wrote:
Thanks apok for your help
even with pressing start it keeps running on wait case
could you please explain the code for me, the use of Boolean crossing, increment , and equal functions
Best Regards
Rajab
OK..I modded the example to stop after 2 cycles. Also recommend taking the free online LabVIEW tutorials.
run vi. case statement goes to "initialize", shift registers are initialized to their constants. goto "wait"
"start"= false, stay in current state. If true, transition to "1 min" case
reset elapsed timer with True from shift register(counter starts at zero)."time has elapsed"=false, stay in current state(1 min). If true, goto "5min" case
reset elapsed timer with True from shift register of previous case(counter starts at zero)."time has elapsed"=false, stay in current state(5 min). If true, goto "1min" case. Also, bool crossing is looking for "true-false" from "5 min" compare function to add cycle count.
Once cycle count reaches 2, stop while loop....
Attachments:
Untitled%202[1].vi 42 KB -
Direct Path Read waits are not showing in Elapsed time
Hi,
I'm having a question regarding interpretation of a SQL trace file. I'm on Oracle 11.2.0.1 HP/UX 64 bit.
Following is only the overall result of the trace (it is quite big).
My question is about the Direct Path Read waits which are totallizing 268s of wait but are not showing in the fetch elapsed time (49.58s) and are not showing anywhere in the trace except in the overall result.
I do not understand why it is not part of the Elapsed time...
For info, the trace is for the specific session that was performing all the required queries to display an online report. The database is accessed by the Java application using Hybernate.
The trace was obtained by the following SQL:
exec sys.dbms_monitor.serv_mod_act_trace_enable(service_name=>'SYS$USERS',waits=>true,binds=>true);Then I query the sessions to find the one created by the application.
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 36 0.43 0.51 0 5 0 0
Execute 62 0.01 0.01 0 0 0 0
Fetch 579 4.01 49.06 3027 153553 0 5516
total 677 4.45 49.58 3027 153558 0 5516
Misses in library cache during parse: 29
Misses in library cache during execute: 2
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 32754 0.00 0.03
SQL*Net message from client 32753 2.33 232.01
Disk file operations I/O 179 0.00 0.02
db file sequential read 2979 0.54 45.72
SQL*Net more data to client 133563 0.04 5.30
direct path read 34840 0.94 268.21
SQL*Net more data from client 1075 0.00 0.02
db file scattered read 6 0.03 0.11
asynch descriptor resize 52 0.00 0.00
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 25 0.00 0.02 0 0 0 0
Execute 58 0.05 0.04 0 0 0 0
Fetch 126 0.00 0.04 4 161 0 123
total 209 0.05 0.11 4 161 0 123
Misses in library cache during parse: 3
Misses in library cache during execute: 3
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
Disk file operations I/O 1 0.00 0.00
db file sequential read 4 0.01 0.03
asynch descriptor resize 1 0.00 0.00
37 user SQL statements in session.
57 internal SQL statements in session.
94 SQL statements in session.
Trace file: oxd1ta00_ora_16542.trc
Trace file compatibility: 11.1.0.7
Sort options: default
1 session in tracefile.
37 user SQL statements in trace file.
57 internal SQL statements in trace file.
94 SQL statements in trace file.
57 unique SQL statements in trace file.
241517 lines in trace file.
568 elapsed seconds in trace file.Thanks
ChristopheChristophe Lize wrote:
Closing this thread even if it's not answered...Sorry, I don't have time to test this myself now, but you shouldn't mark this thread as answered if it is not, because other people might find it and think they find an answer if they have a similar question.
I suggest you try the following to narrow down things:
1. Open the RAW trace file and check the cursor numbers of the "direct path reads" - check if you can find any references for those cursor numbers manually. The cursor numbers are those numbers behind the WAIT #<xx>, and you can check if you find any other entry unequal to WAIT #<xx> with the same #<xx>, for example EXEC #<xx> or FETCH #<xx>
A short primer on how to interpret the raw trace file can also be found in MOS document 39817.1
2. Run the RAW trace file through alternative free trace file analyzers like SQLDeveloper (yes it can process raw trace files), OraSRP or Christian Antognini's TVD$XTAT. If you have My Oracle Support access you can also try Oracle's own extended Trace Analyzer (TRCA / TRCANLZR). See MOS Note 224270.1
Check if these tools tell you more about your specific wait event and oddities with the trace file in general.
Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
Co-author of the "OakTable Expert Oracle Practices" book:
http://www.apress.com/book/view/1430226684
http://www.amazon.com/Expert-Oracle-Practices-Database-Administration/dp/1430226684 -
Same sqlID with different execution plan and Elapsed Time (s), Executions time
Hello All,
The AWR reports for two days with same sqlID with different execution plan and Elapsed Time (s), Executions time please help me to find out what is reason for this change.
Please find the below detail 17th day my process are very slow as compare to 18th
17th Oct 18th Oct
221,808,602
21
2tc2d3u52rppt
213,170,100
72,495,618
9c8wqzz7kyf37
209,239,059
71,477,888
9c8wqzz7kyf37
139,331,777
1
7b0kzmf0pfpzn
144,813,295
1
0cqc3bxxd1yqy
102,045,818
1
8vp1ap3af0ma5
128,892,787
16,673,829
84cqfur5na6fg
89,485,065
1
5kk8nd3uzkw13
127,467,250
16,642,939
1uz87xssm312g
67,520,695
8,058,820
a9n705a9gfb71
104,490,582
12,443,376
a9n705a9gfb71
62,627,205
1
ctwjy8cs6vng2
101,677,382
15,147,771
3p8q3q0scmr2k
57,965,892
268,353
akp7vwtyfmuas
98,000,414
1
0ybdwg85v9v6m
57,519,802
53
1kn9bv63xvjtc
87,293,909
1
5kk8nd3uzkw13
52,690,398
0
9btkg0axsk114
77,786,274
74
1kn9bv63xvjtc
34,767,882
1,003
bdgma0tn8ajz9
Not only queries are different but also the number of blocks read by top 10 queries are much higher on 17th than 18th.
The other big difference is the average read time on two days
Tablespace IO Stats
17th Oct
Tablespace
Reads
Av Reads/s
Av Rd(ms)
Av Blks/Rd
Writes
Av Writes/s
Buffer Waits
Av Buf Wt(ms)
INDUS_TRN_DATA01
947,766
59
4.24
4.86
185,084
11
2,887
6.42
UNDOTBS2
517,609
32
4.27
1.00
112,070
7
108
11.85
INDUS_MST_DATA01
288,994
18
8.63
8.38
52,541
3
23,490
7.45
INDUS_TRN_INDX01
223,581
14
11.50
2.03
59,882
4
533
4.26
TEMP
198,936
12
2.77
17.88
11,179
1
732
2.13
INDUS_LOG_DATA01
45,838
3
4.81
14.36
348
0
1
0.00
INDUS_TMP_DATA01
44,020
3
4.41
16.55
244
0
1,587
4.79
SYSAUX
19,373
1
19.81
1.05
14,489
1
0
0.00
INDUS_LOG_INDX01
17,559
1
4.75
1.96
2,837
0
2
0.00
SYSTEM
7,881
0
12.15
1.04
1,361
0
109
7.71
INDUS_TMP_INDX01
1,873
0
11.48
13.62
231
0
0
0.00
INDUS_MST_INDX01
256
0
13.09
1.04
194
0
2
10.00
UNDOTBS1
70
0
1.86
1.00
60
0
0
0.00
STG_DATA01
63
0
1.27
1.00
60
0
0
0.00
USERS
63
0
0.32
1.00
60
0
0
0.00
INDUS_LOB_DATA01
62
0
0.32
1.00
60
0
0
0.00
TS_AUDIT
62
0
0.48
1.00
60
0
0
0.00
18th Oct
Tablespace
Reads
Av Reads/s
Av Rd(ms)
Av Blks/Rd
Writes
Av Writes/s
Buffer Waits
Av Buf Wt(ms)
INDUS_TRN_DATA01
980,283
91
1.40
4.74The AWR reports for two days with same sqlID with different execution plan and Elapsed Time (s), Executions time please help me to find out what is reason for this change.
Please find the below detail 17th day my process are very slow as compare to 18th
You wrote with different execution plan, I think, you saw plans. It is very difficult, you get old plan.
I think Execution plans is not changed in different days, if you not added index or ...
What say ADDM report about this script?
As you know, It is normally, different Elapsed Time for same statement in different day.
It is depend your database workload.
It think you must use SQL Access and SQl Tuning advisor for this script.
You can get solution for slow running problem.
Regards
Mahir M. Quluzade -
How to get Sum for my Elapse Time string for my group
Hi,
How can I get the sum of an elapse time string in my group footer 2 and group footer 1 from the report screenshot attached.
I have a report that display TimeIn and TimeOut of an employee.
For the total time I have created a formula that will take my time in seconds and displaying it in hrs, minutes and seconds.
How can I get the sum of all the total time per day and display this in my group footer 2.
As well I will need to add the grand total to group footer 1 for the total of days.
The formula I have for the total time is as follow:
WhileReadingRecords;
NumberVar TotalSec := {TimeLogs.TotalTime};
NumberVar Hours := Truncate (Remainder ( TotalSec , 86400) / 3600) ;
NumberVar Minutes := Truncate (Remainder ( TotalSec , 3600) / 60) ;
NumberVar Seconds := Remainder (TotalSec , 60) ;
Totext ( Hours , '00' ) + ':' +
Totext ( Minutes , '00' ) + ':' +
Totext ( Seconds , '00' )
This is a seperate question below but related as well to this report.
Another question I have is how can I round up for example 03:30:58 to 03:31:00
And also how can I round down for example 03:26:10 to 03:26:00
Any help would be appreciated.
Thank you,
JoeHi Jamie,
Well I ran into an issue with this. My Daily Total, there is no issue, it is displaying the proper time. But when I add a summary to my Group Footer 1, it doesn't add up properly.
If I select only 1, 2, or 3 days my Date Range Total is adding fine but when selecting 5 days for example, as you can see from the picture below, for an unknowned reason the total of hrs is wrong.
Do you know why this is happening.
Than you for your help.
Joe
Picture below, this is working fine? -
Write elapsed time to a spreadsheet in hours:minutes:seconds format
Hi everyone,
I've been trying to write an elapsed time to a spreadsheet file in an hours:minutes:seconds format, but the time is displayed in a floating point value of seconds..
how can I write to a spreadsheet in an hours:minutes:seconds format.
Thank you,
James-I often use a subVI that converts Seconds to Hours, Minutes and Seconds. Use the Quotient and Remainder function to divide your elapsed time by 3600, 60 and 1. You can then convert those values to a modified string and use the Write to Spreadsheet File.
As Dennis said, newer versions of LabVIEW's Write to Spreadsheet File.VI can handle arrays of Double, Integer or String automatically, and in older versions, the Write to Spreadsheet File.VI can be modified and copied to handle strings.
Hope this helps.
(Written in 8.5)
Message Edited by LabViewGuruWannabe on 01-18-2008 09:28 PM
Attachments:
TimeToSpreadsheet.vi 26 KB
SecondstoHMS.png 32 KB -
File adapter - Write - Elapsed Time based batching not working.
We are creating an asynchronous BPEL process that creates a file every 2 mins with the messages the BPEL process received in the last 2 minutes. We are using a file adapter with only "elapsed time" set to 2 minutes (Number of Messages and File size disabled) . If we deploy this into BPEL console and use bpel console's stress test feature, it doesnt create any file at all. If we use a file adapter based on Number of messages, it works fine. Can any one of you suggest what could be the problem ?
Unfortunately, this is documented bahaviour (solution/workaround anyone?!):
Elapsed Time Exceeds:
Specify a time which, when exceeded, causes a new outgoing file to be created.
Note:
The Elapsed Time Exceeds batching criteria is evaluated and a new outgoing file is created, only when an invocation happens.
For example, if you specify that elapsed time exceeds 15 seconds, then the first message that is received is not written out, even after 15 seconds, as batching conditions are not valid. If a second message is received, then batching conditions become valid for the first one, and an output file is created when the elapsed time exceeds 15 seconds. -
How to get elapsed time of the query in form 6i
hi
I used to use " set timing on " in sql to get the elapsed time
set timing on
elapsed time :XX:XX:XX ,
but i dont know how to get it in fom
its really imporant to measure the time elapsed for me cuz i am student an need to get the time
thanx alotregarding to point 1 : u know there are three modes for system ; query, enter_qeury,and normal. when the system is not noraml so it is either query or enter_query , and both are query processing ( as i think) so it the elapsed time . it also by using timer stpos when system finish query ( normal)
why you dont prefer timers ..... ( it important please to explain )
thank you very much Navnit Punj
Edited by: user8652693 on 22/07/2009 07:33 ص -
When my process stops, I am reading an array of tags(datapoints) and writing the max and average to memory tags for data logging. However, when viewing the data, the elapsed time between cycles spreads the data out unevenly. It could be 90 seconds between cycles or maybe two hours or longer. Is there a way to convert the time axis data to be just consecutive datapoints?? It would be like logging data based on a particular condition happening rather than time-based trending. Should I try to use the data set logger examples instead?? I would prefer to use the built-in datalogging features rather than writing to databases.
You could export your data to a spreadsheet file and then actually write then again in a second database using this example program in the devzone
http://zone.ni.com/devzone/conceptd.nsf/webmain/5A921A403438390F86256B9700809A53?opendocument
Using this program (if you don't want to modify it, which would take a reasonable amount of time specially if you are not familiar with VI-Based Server) You would have to generate a collum in your spreadsheet file to be the timestamp, it would be a artificial timestamp.
What you could do in your application is to first save the data to file and then read from file, substitute the collum timestamp for the "artificial one" and then write it to the database, again, with that you would not need to modify this program.
However if you have the time and is willing to work with VI-based server you could try to modify the example program to be adapted for your purposes.
I hope it helps
Good Luck
Andre Oliveira
Applications Engineer
National Instruments
Maybe you are looking for
-
How do i get just the icons to appear in my yahoo tool bar without the labels?
how do i get the tool bars to just show the icons and not the labels or the short description of the icon. it makes a few of the icons hidden and i then need to scroll down to open them.
-
17" Studio ADC display to Thunderbolt
I have an old PowerMac G4 that I use with the ADC display. Well I will soon be aquiring a new 13" MacBook air. I want to know if I can use a series of adapters to hook up my old ADC display to my new MacBook w/ Thunderbolt. What do I need?
-
Connecting to Oracle After installing D2K - V.20 on an Oracle 8.1.5
I can not connect to Oracle. I have forms in Drive C: and oracle 8.15 in drive D: Oracle Path: D:\Oracle\Ora81 Forms Path: C:\Forms5 They have to diferent home Paths in the Registry. Now the registry has 2 sets of folders. For Oracle: Oracle\All_home
-
On Macintosh, Adobe Reader 9 don't read flash animations...
Hello, Ive just downloaded Adobe reader 9 and, on my iMac INTEL 20"C2D under 10.5.4, and flash animations are not read. A right click on the site of animation says to me: "Animation unloaded", and that as well with Adobe Reader 9.0 or with Safari. In
-
Changing tick colour on JSliders. any clues?
Hi there, Is there a way to change the colour of the tick labels or colours on a JSlider? Cheers, Hugh