VI for recording data
Hi all,
I am a mechatronics student, and am new to labview. Needed some help with a few things to get started. I am using labview student edition 2009 and a NI 9213 temperature module with NI USB 9162. I wanted to design a VI that would in essence do the following tasks:
1. Check to see how many sensors are connected and display LEDs for the same.
2. Take an average of the sensors values. (but only those which are connected).
3. Show sensor values and deviation of the individual values from the calculated average.
I have started the design of the VI but am just in the basics. I wanted to know how it is possible to check data coming from DAQ satisfies a set of given 'if then else' conditions?
I hope you can help me out.
Attachments:
Setup.vi 71 KB
Hi,
So i tried working a little further to develop the VI to check for if a signal was (+ve), if so then it is relevant for calculation of average else dicard...
I wrote down a simple C/C++ code as I am used to programming in that.. it goes as follows :
avg,count, loca_sum = 0;
for (int i=0;i<=15;i++)
if (a[i]>0)
local_sum = Local_sum + a[i];
count ++,;
avg = local_sum / count
I wanted to implement this simple for loop into my labview VI.... but i was not sucessful.. can some one help me out with this...
Attachments:
Setup.vi 97 KB
Similar Messages
-
How do I initialize a DVD to prepare for recording data?
Using an S5150t pavilion, LightScribe drive. How do I initialize a DVD to prepare for recording data? The HP Digital Media program only addresses pictures and video.
Bill, here is a guide to using CyberLink DVD Suite 6. This is the program that the Product Specifications page states is on your computer.
Please let us know if this solves your problem or not.
Signature:
HP TouchPad - 1.2 GHz; 1 GB memory; 32 GB storage; WebOS/CyanogenMod 11(Kit Kat)
HP 10 Plus; Android-Kit Kat; 1.0 GHz Allwinner A31 ARM Cortex A7 Quad Core Processor ; 2GB RAM Memory Long: 2 GB DDR3L SDRAM (1600MHz); 16GB disable eMMC 16GB v4.51
HP Omen; i7-4710QH; 8 GB memory; 256 GB San Disk SSD; Win 8.1
HP Photosmart 7520 AIO
++++++++++++++++++
**Click the Thumbs Up+ to say 'Thanks' and the 'Accept as Solution' if I have solved your problem.**
Intelligence is God given; Wisdom is the sum of our mistakes!
I am not an HP employee. -
Search for records by Remote Key or Remote System in Data Manager
Hi all,
We have a requirement to search for records by Remote key and/or Remote System at the main table level. Is it possible to do this using the Data Manager? If so, how?
Thanks in advance!
Lavanya.Hi,
I crosschecked with MDM 5.5 and Don't think it is possible through Data Manager. How ever using APIs you can search records using remote key/ remote system.
Regards,
Shiv -
There is no source data for this data record, Message FZ205
Hi Experts,
I am facing a problem with the DME File download. This problem happened all of sudden in our production system since last month and it was never before. Our system landscape has also not been changed but as per our basis consultant he has added two-three more new application server to the Production client. Even we do not have this problem in our testing clients.
Please note that we have been using the output medium '1' from the day one and thus the system has been generating the DME in 'File System' which we download on the desktop and upload the same to the bank online. After running the payment run when we trying to download the DME File, the system gives the error "There is no source data for this data record, Message FZ205".
I tried to fix this issue through many ways but not able to. So can you please let me know the reason of this error and solution to fix this.
With best regards,
BABAHi Shailesh,
Please share how you solved this problem.
Many Thanks,
Lakshmi -
I want to enable a user to enter a start and end date to
define the period they want to search for records of members who
joined on certain dates. Funny thing is...I've got it to work half
of the time. For e.g. I have 4 records between 26/10/2005 and
1/08/2006. When I enter 01/01/2005 as startDate and 31/08/2006 as
endDate, I get the 4 records. However, if I alter the endDate to
01/09/2006 I get every record in the database!!!??? Why's this? I
can't get my head around it!
Here's my code:
First the code for the form the user input the search
criteria on:
<html>
<body>
<FORM action="memberJDateSearch.cfm" method="post">
<p>Start Date: <input type="text"
name="startDate">
<br>End Date: <input type="text" name="endDate">
<input type="reset" value="Clear">
<input type="submit" value="Submit">
</FORM>
</body>
</html>
Simple enough. Now the code for the process and display page:
<html>
<body>
<cfquery name="memberJDateSearch"
datasource="jpkelle2-access">
SELECT *
From members
WHERE ((joinDate BETWEEN #CreateODBCDate(startDate)# AND
#CreateODBCDate(endDate)#))
</cfquery>
<table border=1 bgcolor="beige" cellpadding="3"
cellspacing="0">
<tr>
<th>Member ID</th>
<th>Name</th>
<th>Sex</th>
<th>Date of Birth</th>
<th>Address</th>
<th>Email</th>
<th>Date Joined</th>
</tr>
<CFOUTPUT Query="memberJDateSearch">
<tr>
<td><center>#memberID#<center></td>
<td width="15%">#forename# #initial#
#surname#</td>
<td>#sex#</td>
<td width="10%">#disp('#dob#')#</td>
<td>#address#, #town#, #county#, #postCode#</td>
<td>#email#</td>
<td width="10%">#disp('#joinDate#')#</td>
</tr>
</CFOUTPUT>
</table>
<hr><p>End of members list.</p>
</body>
</html>
any ideas? please help me.Try formatting your dates first (before the CreateODBCDate
call). I just tried this on my test page and it worked properly. I
removed the DateFormat calls, keeping the dates in your format and
it didn't work. See if something like the following will help:
<cfset startDate =
DateFormat("31/01/2006","dd/mm/yyyy")/>
<cfset endDate =
DateFormat("01/09/2007","dd/mm/yyyy")/>
<cfquery name="memberJDateSearch"
datasource="jpkelle2-access">
SELECT *
From members
WHERE ((joinDate BETWEEN #CreateODBCDate(startDate)# AND
#CreateODBCDate(endDate)#))
</cfquery> -
How to avoid record rejection due to conversion failed for dirty data
There is a source delimited flat file created with codepage CP936, simplified
Chinese. Data Services XI on HP Unix has to extract this file to a UTF-8 db2
table.
However, because the flat file contains a lot of dirty or corrupted
characters for Chinese word columns, some records are failed to convert and being
rejected by DS to load to db2. Typically the error is the corrupted character
causes DS to think there is less delimiters on the record then it should be.
I use less perfect workaround to cheat DS to tell it is UTF8 codepage input file
instead of CP936 codepage file, and DS doesn't complain missing delimiters no more, but the
extracted Chinese columns are not readable.
However, problem resurfaces again when DS encounters this gibberish data value in
one column of the record:
u20AC\ \u2021 u20ACxu2019 u20AC
The record will be rejected entirely and no error and no warning being generated
by DS to explain the rejection. Even I try to use Text delimiter of double qoute to enclose
this data value, but DS still unable to extract it and rejects the whole record without warning.
Is there a way to use Validation Transform or other transforms to catch all the conversion
errors before hand, and assign null value for dirty data values, rather then
letting the records being rejected?
Or there is a way to set the options and relax the conversion errors to let
all data records successfully extracted? Currently at Error handling section
of flat file format object, all error handling and logging options are
selected Yes.
Edited by: Chow Ming Darren Cheeng on Aug 7, 2009 10:31 AMThank you for your reply. Currently I am using this ifthenelse function to check wheter the data value contains
escape character and set the whole value to null to avoid data rejection.
ifthenelse(index(column_value, '
', 1) IS NOT NULL, NULL, column_value)
The source file team says that whenever they have nonprintable characters inside the data value, the character will be escaped with
I agree with what you said if record is broken up too much, DS has no choice but to skip it. -
Need to record data for 4 hrs at a rate of every 30s
Hello,
I'm fairly new to LabVIEW and need assistance. I have this VI that manually records torque and temperature by hitting a button. I want to alter it so that when I run the program I can automatically collect data every 30 sec for 4 hrs and then the program stops. Any help would be appreciated. I have attached the VI.Bob_Schor wrote:
One of the most difficult things for people new to LabVIEW to avoid is the temptation to "just start coding" -- as often as not, you end up with a bunch of (often Express) VIs wired together that do something, but rarely what you want it to do.
I recommend starting with thinking about the overall design, asking yourself "What do I want to do?". In your case, it sounds like "Record data (not yet defined) every 30 seconds for 4 hours". Now break this down -- what does "record data" mean? How much data? How many channels? What data rate? What do you want to do with the data?
This might be a "unit" of your code, that is, this "Data Recording Block" might, in some ways, stand alone. One way this could happen would be if you recorded, say, 5 seconds of data, wrote the data to a uniquely-named file, then stopped recording. "Aha!", I (don't) hear you saying, "this should be written as a sub-VI called "Save Some Data" that I put in my main program and call every 30 seconds until 4 hours have gone by".
What is this isn't your model? Maybe you want to start data acquisition, keep it running, and every 30 seconds save some aliquot of the data to a file. Fine, but that's another Design Decision that you should make before starting to code. This kind of model sounds liek it might be a Producer (continuous data acquisition)/Consumer (periodic saving of the data) design, with the Consumer "worrying" about saving, say, 5 second aliquots of data every 30 seconds for 4 hours. This last bit (namely getting the Consumer to "do its thing" properly) might be handled by a State Machine design ("Save to File", "Wait for next Sample Time", "Count Elapsed Time").
Here is a piece of Good Advice -- never put an "Abort LabVIEW" command in your program! Notice you have a Stop button to stop the loop, and can OR wire the output now going to the Abort to the same Stop indicator. Use Abort in the rare instance where failure to instantly kill the program will result in someone's death or injury -- you're not yet ready to code at this level.
Bob Schor
To expand on this idea, I usually write up at least a "casual" requirements document - even if it's just a few paragraphs - and code each "requirement" as a subVI. -
Query for records on a block with Query Data Source Type : Procedure
Hi All,
The veriosn of form I'm using is:
Forms [32 Bit] Version 6.0.8.23.2
I have a block based on a procedure.
But when I enetr-query and search for records specific to ceratin criteria even then the result of the Query is all records.
Is Query not allowed on a block with Query Data Source Type : Procedure.
Hope my question is clear.
Thanks in advance.
Regards
ArifWhen you use a table based block, forms can construct any select with any where clause based on the given inputs. Using a procedure based block, forms cannot "know" which in or out parameter of the procedure corresponds to which item. Even if Forms could pass the value of an item to an argument automagically, the procedure would have to "do something" with the argument, and you´d have to code it.
So, any item that should be used in the where-clause must be mapped to an argument.
Perhaps it would be easier to use a table based block querying a view? For DDL, you could use an instead-of-trigger on the view.
Regards,
Gerd -
Missing records for any date, take previous date.
Hi ,
I had done it thourgh PL SQL but need advice on whether this can be done through SQL and in a better way,
Requirements,
1. I have a table which hold daily data.
2. I have a date range. It can be anything. For example between 1st Jan 2013 to 23rd Jun 2013.
Now I have a table. This table have daily records. In case missing for any date it should take the previous dates data.
Sample Data:
{code}
with data as
(select '01-JAN-2013' as report_date , 45 as report_value from dual
union all
select '02-JAN-2013' as report_date , 49 as report_value from dual
union all
select '03-JAN-2013' as report_date , 51 as report_value from dual
union all
select '04-JAN-2013' as report_date , 54 as report_value from dual
union all
select '05-JAN-2013' as report_date , 55 as report_value from dual
union all
select '06-JAN-2013' as report_date , 59 as report_value from dual)
select * from data;
{code}
Sample Output:( when date range passed as 01-Jan-2013 to 08-JAN -2013
{code}
01-JAN-2013 45
02-JAN-2013 49
03-JAN-2013 51
04-JAN-2013 54
05-JAN-2013 55
06-JAN-2013 59
07-JAN-2013 59
08-JAN-2013 59
{code}Something like this...
WITH data AS
(SELECT '01-JAN-2013' AS report_date, 45 AS report_value FROM DUAL
UNION ALL
SELECT '02-JAN-2013' AS report_date, 49 AS report_value FROM DUAL
UNION ALL
SELECT '03-JAN-2013' AS report_date, 51 AS report_value FROM DUAL
UNION ALL
SELECT '04-JAN-2013' AS report_date, 54 AS report_value FROM DUAL
UNION ALL
SELECT '05-JAN-2013' AS report_date, 55 AS report_value FROM DUAL
UNION ALL
SELECT '06-JAN-2013' AS report_date, 59 AS report_value FROM DUAL)
SELECT NVL (TO_DATE (report_date, 'DD-MON-YYYY'), t.dt) report_date,
NVL (report_value,
(SELECT MAX (report_value)
FROM data
WHERE report_date = (SELECT MAX (report_date) FROM data)))
report_value
FROM data
RIGHT OUTER JOIN
( SELECT TO_DATE ('01-JAN-2013', 'dd-Mon-YYYY') + ROWNUM - 1 dt
FROM DUAL
CONNECT BY ROWNUM <=
TO_DATE ('08-Jan-2013', 'dd-Mon-YYYY')
- TO_DATE ('01-Jan-2013', 'dd-Mon-YYYY')
+ 1) t
ON TO_DATE (report_date, 'DD-MON-YYYY') = dt;
REPORT_DATE REPORT_VALUE
1/1/2013 45
1/2/2013 49
1/3/2013 51
1/4/2013 54
1/5/2013 55
1/6/2013 59
1/8/2013 59
1/7/2013 59
Cheers,
Manik. -
Sql query - Selecting last recorded values for each date in specified period
Hello,
Can someone please help me with my problem.
I'm trying to get last recorded balance for each day for specific box (1 or 2) in specified period of days from ms access database using ADOTool.
I'm trying to get that information with SQL query but so far unsuccessfully...
My table looks like this:
Table name: TestTable
Date Time Location Box Balance
20.10.2014. 06:00:00 1 1 345
20.10.2014. 12:00:00 1 1 7356
20.10.2014. 18:45:00 1 1 5678
20.10.2014. 23:54:00 1 1 9845
20.10.2014. 06:00:02 1 2 35
20.10.2014. 12:00:04 1 2 756
20.10.2014. 18:45:06 1 2 578
20.10.2014. 23:54:10 1 2 845
21.10.2014. 06:00:00 1 1 34
21.10.2014. 12:05:03 1 1 5789
21.10.2014. 15:00:34 1 1 1237
21.10.2014. 06:00:00 1 2 374
21.10.2014. 12:05:03 1 2 54789
21.10.2014. 15:00:34 1 2 13237
22.10.2014. 06:00:00 1 1 8562
22.10.2014. 10:00:00 1 1 1234
22.10.2014. 17:03:45 1 1 3415
22.10.2014. 22:00:00 1 1 6742
22.10.2014. 06:00:05 1 2 562
22.10.2014. 10:00:16 1 2 123
22.10.2014. 17:03:50 1 2 415
22.10.2014. 22:00:10 1 2 642
23.10.2014. 06:00:00 1 1 9876
23.10.2014. 09:13:00 1 1 223
23.10.2014. 13:50:17 1 1 7768
23.10.2014. 19:47:40 1 1 3456
23.10.2014. 21:30:00 1 1 789
23.10.2014. 23:57:12 1 1 25
23.10.2014. 06:00:07 1 2 976
23.10.2014. 09:13:45 1 2 223
23.10.2014. 13:50:40 1 2 78
23.10.2014. 19:47:55 1 2 346
23.10.2014. 21:30:03 1 2 89
23.10.2014. 23:57:18 1 2 25
24.10.2014. 06:00:55 1 1 346
24.10.2014. 12:30:22 1 1 8329
24.10.2014. 23:50:19 1 1 2225
24.10.2014. 06:01:00 1 2 3546
24.10.2014. 12:30:26 1 2 89
24.10.2014. 23:51:10 1 2 25
Let's say the period is 21.10.2014. - 23.10.2014. and I want to get last recorded balance for box 1. for each day. The result should look like this:
Date Time Location Box Balance
21.10.2014. 15:00:34 1 1 1237
22.10.2014. 22:00:00 1 1 6742
23.10.2014. 23:57:12 1 1 25
So far I've managed to write a query that gives me balance for ONLY ONE date (date with highest time in whole table), but I need balance for EVERY date in specific period.
My incorrect code (didn't manage to implement "BETWEEN" for dates...):
SELECT TestTable.[Date], TestTable.[Time], TestTable.[Location], TestTable.[Box], TestTable.[Balance]
FROM TestTable
WHERE Time=(SELECT MAX(Time)
FROM TestTable
WHERE Location=1 AND Box=1 );
Tnx!
Solved!
Go to Solution.For loop
following query keep day (here 24 in below query) Variable from ( 1 to 28-29/30/31 as per month)
SELECT TOP 1 TestTable.[Date], TestTable.[Time], TestTable.[Location], TestTable.[Box], TestTable.[Balance]
FROM Test Table.
WHERE Time=(SELECT MAX(Time) FROM TestTable WHERE Location=1 AND Box=1 )
AND DATE = "2014-10-24";
PBP (CLAD)
Labview 6.1 - 2014
KUDOS ARE WELCOMED.
If your problem get solved then mark as solution. -
Hello,
I am very new to Oracle Forms and have been tasked with pointing some forms we have to a new server and adding a couple of columns to come areas. Everything was going ok until I got to a the point where I have to add a new column to an area on a form. The forms are pointing to the new tables and the searches are working, or at least seem to be working. How can I tell the data source for a data group? I checked properties for the record group (RECORD_STATISTICS) that populates a certain area on a form and it has query selected as the record group type but there is no query showing. I added the column needed to the column specifications list but it does not show up when I run the form. There is a spot for it because the extra hyphen is there.
Here is the code that populates the fields on the form. The field I added is the ahs_site column. As mentioned earlier I added that field to the RECORD_STATISTICS data group as well as to all the procedures I can find but am missing something..
DECLARE
htree ITEM;
num_selected NUMBER;
current_node FTREE.NODE;
v_note_value number;
v_node_depth number;
total_rows number;
group_id RecordGroup;
v_selection_count NUMBER;
BEGIN
-- Find the tree itself.
htree := Find_Item('BLOCK_STATISTICS_TREE.TREE_ITEM_STAT');
v_selection_count := Ftree.GET_TREE_PROPERTY(htree, Ftree.SELECTION_COUNT);
IF v_selection_count>0 THEN
v_note_value := Ftree.Get_Tree_Node_Property(htree, :SYSTEM.TRIGGER_NODE, Ftree.NODE_VALUE);
IF v_note_value IS NOT NULL THEN
group_id := Find_Group('RECORD_STATISTICS');
total_rows := Get_Group_Row_Count(group_id);
v_node_depth := to_number(Get_Group_Number_Cell('RECORD_STATISTICS.NODE_DEPTH', v_note_value));
-- :BLOCK_BUDGET_PARAMETER.DI_SELECTED2 := v_node_depth;
GO_BLOCK('BLOCK_STATISTICS_DETAIL');
CLEAR_BLOCK;
FOR i in v_note_value..total_rows LOOP
IF v_node_depth=4 THEN
:BLOCK_STATISTICS_DETAIL.DI_TEMPLATE_SEQ := Get_Group_Number_Cell('RECORD_STATISTICS.NODE_SEQ', v_note_value);
:BLOCK_STATISTICS_DETAIL.DI_DESCRIPTION := Get_Group_Number_Cell('RECORD_STATISTICS.SITE', v_note_value)
|| ' - '|| Get_Group_Char_Cell('RECORD_STATISTICS.AHS_SITE',v_note_value)
|| ' - '|| Get_Group_Char_Cell('RECORD_STATISTICS.PRIMARY_CD', v_note_value)
|| ' - '|| Get_Group_Char_Cell('RECORD_STATISTICS.SECONDARY_CD', v_note_value)
|| ' - '|| Get_Group_Char_Cell('RECORD_STATISTICS.SECONDARY_CD_DESC', v_note_value);
:BLOCK_STATISTICS_DETAIL.DI_YR_AND_MNTH := Get_Group_Number_Cell('RECORD_STATISTICS.YR_AND_MNTH', v_note_value);
:BLOCK_STATISTICS_DETAIL.TI_QUANTITY_STAT := Get_Group_Number_Cell('RECORD_STATISTICS.QUANTITY', v_note_value);
ELSE
IF Get_Group_Char_Cell('RECORD_STATISTICS.LEAF_NODE', i)='Y'
AND v_node_depth < to_number(Get_Group_Number_Cell('RECORD_STATISTICS.NODE_DEPTH', i)) THEN
:BLOCK_STATISTICS_DETAIL.DI_TEMPLATE_SEQ := Get_Group_Number_Cell('RECORD_STATISTICS.NODE_SEQ', i);
:BLOCK_STATISTICS_DETAIL.DI_DESCRIPTION := Get_Group_Number_Cell('RECORD_STATISTICS.SITE', i)
|| ' - '|| Get_Group_Char_Cell('RECORD_STATISTICS.AHS_SITE',i)
|| ' - '|| Get_Group_Char_Cell('RECORD_STATISTICS.PRIMARY_CD', i)
|| ' - '|| Get_Group_Char_Cell('RECORD_STATISTICS.SECONDARY_CD', i)
|| ' - '|| Get_Group_Char_Cell('RECORD_STATISTICS.SECONDARY_CD_DESC', i);
:BLOCK_STATISTICS_DETAIL.DI_YR_AND_MNTH := Get_Group_Number_Cell('RECORD_STATISTICS.YR_AND_MNTH', i);
:BLOCK_STATISTICS_DETAIL.TI_QUANTITY_STAT := Get_Group_Number_Cell('RECORD_STATISTICS.QUANTITY', i);
Next_record;
ELSIF v_note_value<>i AND v_node_depth = to_number(Get_Group_Number_Cell('RECORD_STATISTICS.NODE_DEPTH', i)) THEN
EXIT;
END IF;
END IF;
END LOOP;
First_record;
END IF;
END IF;
END;
Hope that made sense. I do not understand how data flows through forms just yet or how to phrase my question in terms that understandable. I do have some screen shots I could send anyone willing to help.
Thank you.Adding a column to column specification does nothing.
First of all, check the record group query in record group properties:
1) In forms builder object tree find that record group, right-click > property palette.
2) Look for property (just cann't remember exactly its name) where select query is specified.
3) Add the column you need to the query. Column specification will refresh automatically.
There is one more way to specify query for record group. Look for calls of POPULATE_GROUP_WITH_QUERY procedure in the form code.
Forms 6i: menu program > find and replace pl/sql, Forms 10: edit > find and replace pl/sql. In the search field type POPULATE_GROUP_WITH_QUERY. Then see the results where your record group RECORD_STATISTIC is being populated programmatically. If no calls were found - the only data source is in record groups properties. -
How to pull records only for particular date range in Flex frm SAP wd table
Hi,
Can anyone help me with databing for datefield.
I am using two datefields in Flex for Start Date and End Date. When I click the Execute button, it should pull only the records for that date range from SAP wd table and display in my Flex datagrid.
Thanks,
Sri
Edited by: rmsridevi on May 17, 2011 4:38 PMHi,
Your query has mistakes as well. I corrected them.
Check this two different ways were in first you can define the period (month) you want and in second you have the option to select from the drop drown list :
SELECT T0.DocNum, T0.DocDate, T0.CardName,T0.DocTotal,T1.whsCode
FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
WHERE t0.docdate >= '2011.01.01' and t0.docdate <='2011.01.31'
OR
SELECT T0.DocNum,T0.DocDate,T0.CardName,T0.DocTotal,T1.whsCode
FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
WHERE t0.docdate >= [%1] and t0.docdate <= [%2]
Kind Regards,
Jitin
SAP Business One Forum Team -
Infotype Master Data - TCODE for recording
Hi HCM Experts,
I am just new to HCM and engaged in data conversion template preparation. I will be executing BDC for below info types. I explore few Tcode in HCM and found that infotypes are repeating on other HCM Tcode also.
Would seek advise on best fit Tcode to perform BDC on below each info types. (i.e which is Tcode to be used for recording of master data of below Into types)
IT1000 Object Name
IT1001 Relationships
IT1005 Planned Compensation
IT1008 Acct. Assignment Features
IT1010 Authorities/Resources
IT1013 Employee Group/Subgroup
IT1050 Job Evaluation Results
IT1051 Survey Results
IT1011 Working Time
IT1028 Address
Please note that i am aware about LSMW and data load conversion activities, need inputs on respective Tcode against each infotypes.
Thks in advance for helping.Hi ,
Use the SHDB transaction for BDC Recording.
Give the transaction to record as PA30.
Then PA30 screen will come.
Fill the Infotype based on your requirement.
Then continue with recording by filling the details of corresponding infotype. -
Record data (depth and audio) - Kinect for Windows v2
Hi,
I am trying to record data from the kinect by using this class: KStudioEventStreamSelectorCollection to get access to IR, Depth, UncompressedColor. I also want audio, but I think i can not use this to get it
At the moment I can create a XEF or XRF file with those data. However the size of the generated file is too big, something around 1GB per 10 seconds.
So, I have two problems/questions:
1st - Is there an way to decrease the size of the generated file?
2nd - Is there an way to also record audio and put it together with the other data, creating a xef file with everything?
I know that Kinect Studio can do this, so I think it is possible. But I do not know how.
Thank you1. No not really, if you are recording Color it is a raw uncompressed format which will be very large in comparison to other streams. If you don't have a need for color, don't record it.
2. Since Kinect Studio is a shell around these same api's, and Audio is a function of the tool then you will be able to record this as well. It looks like the KStudioEventStreamDataTypeId is missing. You should be able to create a Guid object with
the following value and pass this in.
Guid Audio = new Guid(0x787c7abd, 0x9f6e, 0x4a85, 0x8d, 0x67, 0x63, 0x65, 0xff, 0x80, 0xcc, 0x69); -
Get only one record for an id for a date if multiple record exists
Hi,
I need help with below mentioned scenario.
DB Version: 11.2.0.3.0.
Requirement:
Fetch account records that were created after last run of program
Get latest record for an account on a given date if there are multiple records for same account.
If there is a gap of more than 1 day from last run of program, then get latest record for an account for each date if there are multiple records for same account.
Create table t_test
Id number not null,
cust_id number not null,
cust_Acct_id number not null,
ins_date date not null
insert into t_test values
(1, 12345, 678905, to_date('05/31/2012 12:05:10 PM','MM/DD/YYYY HH:MI:SS PM'));
insert into t_test values
(2, 12345, 678905, to_date('05/31/2012 05:25:46 PM','MM/DD/YYYY HH:MI:SS PM'));
insert into t_test values
(3, 12345, 678905, to_date('05/31/2012 11:48:00 PM','MM/DD/YYYY HH:MI:SS PM'));
insert into t_test values
(4, 12345, 678905, to_date('06/01/2012 12:05:10 PM','MM/DD/YYYY HH:MI:SS PM'));
insert into t_test values
(5, 12345, 678905, to_date('06/01/2012 05:25:46 PM','MM/DD/YYYY HH:MI:SS PM'));
insert into t_test values
(6, 12345, 678905, to_date('06/01/2012 11:48:00 PM','MM/DD/YYYY HH:MI:SS PM'));
insert into t_test values
(7, 12345, 678905, to_date('06/02/2012 12:05:10 PM','MM/DD/YYYY HH:MI:SS PM'));
insert into t_test values
(8, 12345, 678905, to_date('06/02/2012 05:25:46 PM','MM/DD/YYYY HH:MI:SS PM'));
insert into t_test values
(9, 12345, 678905, to_date('06/02/2012 11:48:00 PM','MM/DD/YYYY HH:MI:SS PM'));
create table t_log
id number not null,
prgrm_id number not null,
last_run_date date not null
insert into t_log values
(1,1009,to_date('5/30/2012 07:05:12 AM','MM/DD/YYYY HH:MI:SS PM'));Result required:
id cust_id cust_acct_id ins_date
3 12345 678905 '05/31/2012 11:48:00 PM'
6 12345 678905 '06/01/2012 11:48:00 PM'
9 12345 678905 '06/02/2012 11:48:00 PM'
I tried below sql but it will return only id 9 record.
select
id,
cust_id,
cust_acct_id,
ins_date
from
select
id,
cust_id,
cust_acct_id,
ins_date,
row_number() over (partition by cust_acct_id order by ins_date desc) rn
from
t_test t
where
t.ins_date > (
select
last_run_date
from
t_log l
where
l.prgrm_id = 1009
where rn = 1;Thanks in advance.Try:
SQL> select
2 id,
3 cust_id,
4 cust_acct_id,
5 ins_date
6 from
7 (
8 select
9 t.id,
10 t.cust_id,
11 t.cust_acct_id,
12 t.ins_date,
13 row_number() over (partition by cust_acct_id, trunc(ins_date) order by ins_date desc) r
n
14 from
15 t_test t
16 , t_log l
17 where
18 t.ins_date >= l.last_run_date
19 and l.prgrm_id = 1009
20 )
21 where rn = 1;
ID CUST_ID CUST_ACCT_ID INS_DATE
3 12345 678905 31-05-2012 23:48:00
6 12345 678905 01-06-2012 23:48:00
9 12345 678905 02-06-2012 23:48:00But I now see that Bob already nailed it, while I was testing it ;)
Maybe you are looking for
-
[SOLVED] Really need to install sudo to makepkg?
Hi! Been using dwm for a couple of weeks, compiling it every time I made changes with no issues. Today, while trying to do it again, I am prompt to type a password: root pasword is not accepted, and If I type my own password, it says I am not (logica
-
Hi all, can u plz send me the mandatory fields(along with discription) for creation of FB60(vendor invoice),and FK01(cost center). thank u, Srinivas Reddy.
-
Epson Artisan 810 problems after updating to 10.6.6
I'm having all sorts of scanner issues since upgrading. The scanner just plain disappears after several uses. Rebooting the computer seems to make it appear for a while. I Reinstalled the drivers and that didn't make the problem go away. It's like pl
-
How can we ask an order of execution ?
I want to command un order of execution of two operations in my VI. At the beginning, my program worked well but when I added a for loop, the program doesn't work enought like I want it work... Thanks in advance hasna
-
Print Front Panel/Chan​ge Colors?
Unfortunately, the optimal GUI for display on a computer screens does not work very well for printing. I have a program that has a lot of graphs with black backgrounds and it really sucks the black ink if it is printed often. In the past, I solved th