Continuously perform calculations on data
Hey guys,
So I have this program that generates pulse signals using NI-SCOPE, and I had originally done it so that each time the user presses an OK button they will perform certain calculations to generate a value which is stored into an array. My mentor now wants me to make it so that it continuously generates the pulse signals (not just one signal) and adds the values to an array. I need to use the N Samples setting on NI SCOPE so the signal looks as it does in the code below, although if someone has a way to change that, that would be good too.
So basically, how do I perform continuous calculations on pulse signals generated automatically over time? The user should only have to run the program, and the computer does everything else.
Thanks!
Solved!
Go to Solution.
Attachments:
Pulse.vi 143 KB
You need to migrate to a Producer/Consumer structure. In the Producer loop acquire the data contimuously and pass it to the Consumer loop. In the consumer loop, analyze the data and store the data as needed.
A variation on the theme that I would recommend is that rather than using a queue to pass the data, use a user-defined event. The reason for this change is that your present code (which is essentially what will end up in the consumer loop) is event driven so passing the data to the loop via an event will allow it to fit in with the current UI structure.
Oh, yes, one more thing: Get Rid Of The Express VIs. It's time to take off the training wheels...
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps
Similar Messages
-
Need to perform calculations on a specific characteristic in a BeX query
Hi,
I have a requirement to perform calculations based on Characters.
The data that is currently displayed in the report.
Date User Activity A B
04/24/2014 BR3TXA PTWY 10 12
04/24/2014 BR3TXA CLX1 25 04
04/24/2014 YEXM035 NOWE 14 15
04/24/2014 YAXP134 DONQ 08 05
04/24/2014 YRST112 PTWY 12 05
If Activity is PTWY, then A should be A * B = A. For the rest of the activity type, the value in A should be the same.
The result should display as Below:
Date User Activity A B
04/24/2014 BR3TXA PTWY 120 12
04/24/2014 BR3TXA CLX1 25 04
04/24/2014 YEXM035 NOWE 14 15
04/24/2014 YAXP134 DONQ 08 05
04/24/2014 YRST112 PTWY 60 05
Is there a way out in IF, THEN, ELSE statements. Or Customer Exit variable with Code in CMOD would work?This can be achieved just with the help of two simple selections or RKF.
Restrict the KF A with the activity = PTWY--Lets call this RKF1..Now this will populate value against PWTY only.
Create another Restricted KF--with A--This time Exclude value = PWTY--This will populate values against activity other than PWTY...Lets name it RKF2.
Now create a new formula say F1 = (RKF1*B)--Multiply RKF1 with B keyfigure.
Now the final formula say F2 = (F1+RKF2)--This will give the desired result.
Hide the other objects.
Regards,
AL -
Formula variable for date calculations with date-characteristics (2004s)
Hi SDN,
I'd like to calculate the number of days between to date-characteristics. In 3.5, I was used to create 2 formula variables of the type 'replacement path', with 'date' as the dimension indicator. In my formula, I used the 'proces value as date' function for each variable, and I could perform calculations with them.
I'm trying to do the same in 2004s. However, I can't create replacement path's with 'date' as a dimension indicator. So I use 'number' instead, but it doesn't work: my query shows 'x'.
I can use the variables that I created using the 3.5 query designer as a workaround. But I hope there is a better solution.
If other people experience the same problem, please respond. Then I know it's probably a bug.
Kind regards,
DanielDaniel,
Try to look at the formula variables defined before the upgrade and see what is different to the newly defined. I am guessing just the terminology used is different.
If not the date value might be blank or something for one of the f-variables used. Try to display the formula variable values as KF in the query results and check what it is showing.
I hope this helps.
-Bala -
How to get the value from textInput Component to perform calculation?
I need some help here...I'm trying to get the value of user input from the TextInput Component which is the age, height and weight to calculate the bmr and display the result in member("result").text.
How am i suppose to let the integer pass through in order for me to perform calculation? Would appreciate if anyone can help me out with this, thanks!
Below are the formula :
The Harris Benedict equation estimates BMR:
For women: (9.56 x w) + (1.85 x h) – (4.68 x a) + 655
For men: (13.75 x w) + (5 x h) – (6.76 x a) + 66Assumed that this section is only for male ...it still show error saying script error : String expected for
on mouseDown
member("result").text = (13.75 * value(member("weightText").text)) + (5 * value(member("heightText").text)) - (6.76 * value(member("ageText").text)) + 66
end
Do i have to add in "put sprite(x).text -- where x is the number of the sprite that is the text input." ? -
Plannned Delivery time not considered while calculating delivery date
Hi PP Gurus,
We have a situation is that after MRP run system is not taking into account planned delivery time while calculating delivery dates in schedule lines
It is taking into account GR processing time.We have GR processing time of 3 days.requirment date is 13.10.2011 & delivery date created by the system is 10.10.2011.
We have maintained correct master data i.e.Materail Master , Info record & Scheduling agreement.
Please advice why it is happening & what is the significance of planned delivery time in externaly procured materail with scheduling agrement schedule lines?
Thanks & Regards,
SandeshHi Sandesh,
Is this happening for particular materials or for all materials
Couple of checks -
1) Check with material master changes, might be after MRP run PDT is updated in material master etc ..
2) Check in OPPQ, for option external procurement , whether scheduling info records/agree is marked or not
Best Regards
K.Madhu Kumar -
How can we improve the performance while fetching data from RESB table.
Hi All,
Can any bosy suggest me the right way to improve the performance while fetching data from RESB table. Below is the select statement.
SELECT aufnr posnr roms1 roanz
INTO (itab-aufnr, itab-pposnr, itab-roms1, itab-roanz)
FROM resb
WHERE kdauf = p_vbeln
AND ablad = itab-sposnr+2.
Here I am using 'KDAUF' & 'ABLAD' in condition. Can we use secondary index for improving the performance in this case.
Regards,
HimanshuHi ,
Declare intenal table with only those four fields.
and try the beloe code....
SELECT aufnr posnr roms1 roanz
INTO table itab
FROM resb
WHERE kdauf = p_vbeln
AND ablad = itab-sposnr+2.
yes, you can also use secondary index for improving the performance in this case.
Regards,
Anand .
Reward if it is useful.... -
Improve the performance of the data activation on DSO.
Hi,
I would like to improve the performance of the data activation on DSO. 1000 records should be uploaded by 10 minutes.
Now it takes 10 minutes to activate data in DSO. And it is strange that it takes long time ( about 9 minutes) before starting activation.
ex :
in the request task log of the activation:
data activation 15:10:00
main process 15:10:01
technical status 15:10:21
But activation is started at 15:01:00 here. (this is started via process chain).
I have no idea why it takes so long time and how I can improve.
Kind regards,
MasaakiHi,
Try this also.
1. Remove Bex Reporting check box in ODS if not required.
2. Goto manage ODS -> activate -> activate in parallel -> increase the number of processes from there.For direct access try TCode RSODSO_SETTINGS. Not sure this is possible in your case.
thanks,
JituK -
Example: Calculating Operation Dates
Hi Gurus,
http://help.sap.com/saphelp_46c/helpdata/en/7e/d4191b455911d189400000e8323c4f/frameset.htm
Menu path: Routings > Scheduling Routings > Example: Calculating Operation Dates
We have an example in SAP library in the above link.
As per that queue time, setup time and processing time it is taking 10min extra.
I mean the setup time is 0.5hrs, but as mentioned in the example,the setup start at 09.20 and setup end at 10.00. My doubt is setup end time should be 09.50. Why it is taking 10min extra.
Please refer to this example in Library and explain why this difference.
Regards,
JejeshDear,
please refere the example as the Working Time for work Center is 8 hours Which is then reduced to 6 hours after subtracting breaks & Utilization factor it comes as 6 hrs.
So the Total reduction is 25% this means that all timings will be set by adding 25 % so that they can be set in 8 Hr scale. the 10 min that u are refering is result of that.
Think & Try to set the Time considering Breaks & Utilization factor for a Problem ur self u will then able to appriciate that example.
Regards
samunder singh -
How to performing calculations at workbook level using using VB / macros et
HI All,
I want to know about how to perform calculations at the work book level using VB/Macros..
Request provide me links related to this .
Manyt hanks in advance.Hi,
Open the Excel workbook and press ALT + F11. VB editor opens and you can write your piece of code and name it as Auto_open if you need that macro to automatically run when you open excel.
Second option is record macro, which will record the calculation and then call this macro everytime you need.
Thanks,
Tintu -
Bapi_acc_document post is not calculating baseline date based pymnt terms
Hello friends,
Im using bapi_acc_document_post to post db and cr note and i m passing payment terms in the input file but the bapi is not calculating baseline date .
pleasee let me knw the solution.
Regards,
Sunnythat's the disadvantage of bapis and direct input in opposite to BDC. So use "old" rfbibl00 with batch input!
A. -
For performance point, in data loading what we need to do?
Hi,
1.for performance point, in data loading what we need to do?
2.How to increase Cube performance & query Performance?
Thanks,
Basava RajuHi,
In addition to the above steps, especially for data loading, make sure that if you have custom code, its enhanced for performance both on the R3 side and the BI side as well.
For generic data sources, try to make them generic deltas or try pseudo deltas for them.
From a query pespective, in filters, try putting include conditions wheree ver possible instead of exclusions.
Cheers,
Kedar -
Can any give mee a simple way to perform BDC(Batch data communication)
give mee a simple way to perform BDC(Batch data communication)
Moderator message: please search for available information/documentation.
Edited by: Thomas Zloch on Jan 11, 2012Do some research. The easy way to construct a BDC is to record the transaction. You can easily do that from transaction SM35, Recording function button. Once you have the recording, write code to populate the BDC data values, store the BDC and call the program to execute the BDC session(s), or utilize call transaction to call the transaction needed, supplying the BDC table with program name(s), screen(s), fields and data values.
Note that this is very old technology in SAP. I would look for a BAPI that does what I need before resorting to a BDC session. -
How to perform calculations using column data in BI Publisher
Hello guys
I am very new to BIP, and recently I am learning to create new templates using XML files..
I am trying to create a report that has Account Amount, Amount Net Amount, PM_Amount and a New field say "X"
For Account Amount it is what it is, but for Net Amount it is "Account Amount/40%", for PM_Amount it is "Net Amount x (Account Amount/30)" and for field X it is "(Net Amount + PM_Amount)/column A" where column A is another data field in the XML file but it should not be included in the template report..
Could anyone help me with how to perform such kind of calculations in BIP Template builder? In OBIEE, it is very easy that I can just use column formula, but in BIP I still haven't figure out the way yet..
PLease advice
ThanksThanks for the reply..
I looked at the link you provided already, what I wanna know is how to exactly apply the expression in my calculation. In other words, I know that Column C = "Column A div Column B", but in BIP form property, how do I actually substitue "column A" with the actual column..
I wish I could post the XML, but it is huge, it contains 6 data sets and more than 100 columns. I only need 15 columns on my template.
On the form property of each measures, in the "advance tab", I see codes like <?accountamount?>. Now I wanna have a new column said "PM_Amt" which should be "(accountamount div %40) x column B". So I just randomly select another column said "payment". I rename it to "PM_AMT" and on its "advanced tab" it is still <?payment?>. So right there, if I wanna replace that code with a new one that does "(accountamount div %40) x column B" calculation, how would I do it? What would be the syntax including how to propertly refer to the right column field as part of the expression?
And do I have to always use xdofx between <>? how would I know?
Please advice if you understood what I am trying to say
Much thanks
Edited by: user7276913 on Sep 14, 2009 11:24 PM -
Performing calculation on stored data
Hi all, maybe a Lookout developer more experienced than me can help me
with this one.
I am storing information in a Citadel database regarding production
levels and timing, I would like to perform some statistical calculations
such as Average, Std deviation, etc. I am trying to figure out how to pass
the information from the database to the Calculation Objects, I read in the
documentation that are 35 samples available as a data member in some
objects, but I wonder if there is a way to perform the calculations in a
larger number of data. Any idea?
Thank you in advance.
EverardoGood Morning Everardo,
Citadel has built in statistical functions. These are easily experimented
with using MS Query to access Citadel from MS Excel. You might also refer
to the reference manual or online help regarding the ODBC compatibility of
Citadel. With these tools, you can use the SQL object within Lookout to
make queries on Citadel and invoke the built in statistical functions.
Good Luck
Todd Johnson
"Everardo Hernandez" wrote in message
news:[email protected]..
> Hi all, maybe a Lookout developer more experienced than me can help me
> with this one.
> I am storing information in a Citadel database regarding production
> levels and timing, I would like to perform some statistical calculations
> su
ch as Average, Std deviation, etc. I am trying to figure out how to pass
> the information from the database to the Calculation Objects, I read in
the
> documentation that are 35 samples available as a data member in some
> objects, but I wonder if there is a way to perform the calculations in a
> larger number of data. Any idea?
> Thank you in advance.
>
> Everardo
>
> -
How do you get a fillable pdf to perform a new calculation if data is changed on form
I have created a form to calculate payment terms. The forms work great however if you make a mistake inputting or change data after calculation has been preformed i need the new data to be calculated. Is there a way to do this?
thanksHi Gilad,
Thank you for the information. Unfortunately the form that I built does not provide the correct number if any data is changed.
Is there something that I am missing?
I am using the form to complete and installment loan contract
Thanks again
Maybe you are looking for
-
I only edit videos every few months and the last time I edited a video was around 6-9 months ago. At that time, I noticed AME was only using a single core of the CPU and contacted Adobe who instructed me to disable core parking, which worked. After
-
Will the iphone work with a blackberry email server
I am about to start a new job. I was told they have a blackberry email server. Will I beable to recieve and create email using my work email address?
-
Itunes 10 and Tiger 10.4.11
Just downloaded iTunes 10 and it says it works with 10.5 upwards only but the website says: Macintosh Software Mac OS X version 10.4.11 or later; Mac OS X version 10.5 or later is required to play an iTunes LP or iTunes Extras QuickTime 7.6 or later
-
Make a layer from fonts in the document?
OK, here is my situation. I am relatively new to InDesign. I have a workbook that needed an answer key. I should have made a new layer to put the answers on. However, I renamed the main file, and made all of the answers on that 2nd copy. Now,
-
Has 903 oc4j fixed / added rotating log files; -out and -err ?
To be 24/7 an appserver needs to at least support managing the System.out traffic that apps, frameworks (BC4J) spew. It was suggested that 903 OC4J will support rotating log files? Is this true and any help or doc pointers would be great. BTW, I'm mo