How do I reduce the time from the detection of a input threshold to changing the output?
Hi,
I am using LabWindows 8.1 and a PXI-4461 with Vista (home) on a 2.81 GHz Dual Core Processor. I wrote code to do the following:
(1) output a ramp, input a signal concurrently (precise sychronization of these two is not important at this point)
(2) if the input signal rises above 0.5 V, hold the output constant for 2 seconds, while continuing the input
(3) finish the ramp
More info: I do a continuous sampling, with 4 samples per Write, to do the output. The input is read and analyzed with RegisterEveryNSamples (where N = 4). The communication between the tasks is through a global variable "trap," which is set to 1 when threshold is reached. I achieve holding the output constant by stopping the task (maintain existing value = true), and then restarting after the pause. At 40kHz and 4 samples per Write, the limit imposed by the discrete data blocks would be 0.1 msec, but in fact I am getting delays of about 2.5 msec. My write buffer is 120x4 samples, just so that there is space for me to write. I do need to save the input data after the
acquisition, preferably the whole sweep, but most importantly the data
while the output is held constant.
So my questions are:
(a) Does it really take 2 ms to stop a task? When I put in "Timer()" functions as below, I get a difference of 0.002, which is of course limited to the resolution of the Timer() function. Returning from a function (the EveryN callback) should not take that long, right?
(b) Can you suggest any better ways of doing this?
/*****begin excerpt *****/
DAQmxErrChk (DAQmxRegisterEveryNSamplesEvent(inputTaskHandle,DAQmx_Val_Acquired_Into_Buffer,4 ,0,EveryNCallback,NULL));
DAQmxErrChk (DAQmxWriteAnalogF64(outputTaskHandle,480,0,10.0,DAQmx_Val_GroupByChannel,outData,&written, NULL));
DAQmxErrChk (DAQmxStartTask(inputTaskHandle));
DAQmxErrChk (DAQmxStartTask(outputTaskHandle));
for (count =120;count<10000; count++)
if (trap==0) {
DAQmxErrChk (DAQmxWriteAnalogF64(gTaskHandle,4,0,10.0,DAQmx_Val_GroupByChannel,&outData[count*sampsToWrite],&written,NULL));
} else {
DAQmxErrChk (DAQmxStopTask(outputTaskHandle));
time2 = Timer();
done = 1;
ProcessDrawEvents();
ProcessSystemEvents();
Delay (2.0);
trap = 0;
count++;
DAQmxErrChk (DAQmxWriteAnalogF64(outputTaskHandle,480,0,10.0,DAQmx_Val_GroupByChannel,&outData[count*4],&written,NULL));
count = count+119;
DAQmxErrChk (DAQmxStartTask(outputTaskHandle));
/*****end excerpt *****/
int32 CVICALLBACK EveryNCallback(TaskHandle taskHandle, int32 everyNsamplesEventType, uInt32 nSamples,void *callbackData)
DAQmxErrChk (DAQmxReadAnalogF64(taskHandle,nSamples,10.0,DAQmx_Val_GroupByScanNumber,&readData[inCount*nSamples],nSamples,&numRead,NULL));
if (trap == 0 && done == 0) {
for (i=0; i<nSamples; i++) {
if (readData[inCount*nSamples+i] > 0.5) {
trap = 1;
time1 = Timer();
break;
} else done = 1;
inCount++;
Error:
return 0;
I would appreciate any help or advice! Thanks. (Sorry about oddities in the code.)
There are a number of applictations like Carbonite, Aperture, Entourage, VM Fusion, Parellels, etc that treat any change to the application as a complete change to application's database.
So, if you make one small email change in Entourage for example, the entire database is backed up on the next pass. As you might imagine, this can fill up a Time Capsule very quickly.
Suggest that you download a utility like BackupLoupe to find out exactly what is being backed up on each pass. Then you can exclude that item from backups if you wish.
http://soma-zone.com/BackupLoupe/
Similar Messages
-
how do i delete my cell # from my daughters ipod touch? I have changed the #'s in my apple id but it is still using the other cell # in their ipod touch for imessage which allows them to send recieve and read texts to that #.
You can only uncheck the cell phone number. The only way to delete it is to use for FaceTime and Messages an Apple ID not associated with the iPhone.
-
My aperture library lives on an external hard drive that is corrupt and I can not locate the library. I do have it backed up with TM. How do I safely restore the library from TM to my laptop? I am using the newest version of aperture on my macbook pro.
Hello Sandra,
The article linked below details how to go about restoring items from Time Machine in Snow Leopard.
Mac OS X 10.6: Recovering items using Time Machine and Spotlight
http://support.apple.com/kb/PH6379
Sincerely,
Allen -
Problem in retreiving the time from the table
I have stored time in varchar2 format but in forms in order to enable a button i have to compare the time,for that I have used to_char(sysdate,'HH24') as : is not working.How to retreive the time in its exact format/?
Hi,
When you compare the Date and Time Fields which of varchar Type, we will get undesirable results.
Always, Trying Store date in DATE Type.
As, you are using stroed in Character type,
Just try something like this,
SELECT TO_DATE ('23:00:00', 'HH24:MI:SS')
FROM DUAL;Which displays the
Date
6/1/2012 11:00:00 PMThe better way is to convert your varchar2 type to date format and check against it.
Thanks,
Shankar -
How do I delete voice memos from my phone? It does not show in the app or in iTunes. Thanks
Welcome to the Apple Community.
Settings > Music > Show all music > Off -
How can I change the default apple ID for app store. I bought the macbook from my school when I left and I'm the ID in place of mine is the computer departments one. How can i change it to mine?? Thanks
http://support.apple.com/kb/ht5621
-
how do you transfer Apple IDs from one ipad to another iPad? I got the new ipad and gave my ipad 2 to my wife who had the first version and now I can't get my Apple ID off so she can use her Apple ID.
You don't transfer Apple ID's from one device to another one. You sign out in the settings, )the App Store and iTunes if necessary) and then sign in with the other ID.
Settings>iTunes & App Stores>Apple ID>Sign out. Them sign in with the other ID. You can sign out of the app store and iTunes as well by going to the featured Atab in the App Store and the music tab in iTunes, swipe to the bottom and access the Apple ID in there.
You should have erased the iOad before you gave it to her in Settings>General>Reset>Erase all content and settings. That way she could set up the iPad as new with her own Apple ID.
Be aware of the fact that if you use each others ID's in order to download past purchased content to your own iPads, you will lock yourself out of your own ID as you will have associated your iPad with the other person's Apple ID.
In other words, if you sign into your wife's ID on your iPad so that you can download an app or an album so that you don't have to pay for it again, you will lock yourself out of your Apple ID for 90 days. -
RE: Typekit...how do I move the code from an old account to my new account under the Creative Cloud? W/out (preferably) interuption to the website in question? Thanks!
Hi Jesse,
Please email us at [email protected] with:
- your current Typekit account email address
- the email address you use for Creative Cloud
We will be able to help you make this change without disrupting your current font serving.
Thank you,
-- liz -
I have two apple ids one I use everyday an one that's old I need the password an Apple ID from it I don't remember any of it anymore an I didn't have an email at the time so I used a friends email address to activate the id an he passed away so now Stuck
Hi St3vish,
Welcome to the Support Communities!
Our Apple ID Account Security Team may be able to help you with this:
Apple ID: Contacting Apple for help with Apple ID account security
http://support.apple.com/kb/HT5699
I hope this information helps ....
- Judy -
How do I remove old applications from my new Macbook Pro that were part of the data that was migrated over from my older iMac?
ThanksIf the applications were originally drag and drop installations you can simply drag them to the trash and empty. If they were installed by an installer there should be an uninstaller included. If you're not sure you should check with the software developer for instructions. In this case Google can be your friend.
-
I downloaded OS X 10.9.5 and when I attempt to load the program from OS X 10.7.5 I click on the install icon and nothing happens. How do I install the upgrade? Can I upgrade from Lion to Mavericks? Here are my specs:
MacBook Pro
15 – Inch Core 2 Duo
Processor 2.33 GHz Intel Core 2 Duo
Memory 4 GB 667 MHZ DDR2 SDRAM
Graphics ATI Radeon X1600 256 MB
Serial Number W8****W0L
Software Mac OS X Lion 10.7.5 (11G63)
Is my system capable of running the new upgrades?
<Personal Information Edited by Host>kar89 wrote:
I downloaded OS X 10.9.5 and when I attempt to load the program from OS X 10.7.5 I click on the install icon and nothing happens. How do I install the upgrade? Can I upgrade from Lion to Mavericks? Here are my specs:
Sounds like you downloaded the OS X Mavericks 10.9.5 Update or Combo Update. Neither will work on a version of OS X prior to OS X Mavericks. Those are only used to update an existing install of OS X Mavericks. The Combo will update any version from 10.9.0 thru 10.9.4. The Update will only update version 10.9.4.
You need the full installer of OS X Mavericks from the App Store. However, the App Store no longer offers OS X Mavericks. Yosemite is the new FREE OS X. -
How can i stop my phone from vibrating in my ear when i am on the call?
How can i stop my phone from vibrating in my ear when i am on the call? I usually keeps my phone on vibration mode so i get notified when there is a new mail or message? However, when i am on the call, then also, it vibrates in my ear everytime a mail comes. Very irritating. I use my business phone and mails keep coming every 2-5 mins.
Please help.very impractical . specially when you call A LOT and receive notifications constantly!
-
can't stop itunes from changing the time on my ipod when I sync to computer
yeah and the time is correct. I was thinking there is a setting on itunes or something like that
-
I am using icloud and info desapear from ical and several times from my agenda too.
But I desperately need the info from my ical.
I tried using the time machine but i received a messagem saying that they can not modify ical.
Can somebody help me?First of all, we are not Adobe. This is a user to user forum. We are consumers just like you. And I have arthritis, too, although not severe.
Now let's see if we can help you resolve your problem.
Where was it purchased from?
Was it downloaded or was a disc purchased?
What is your operating system?
Is it version Photoshop Elements 13?
Did you use a redemption code to get a serial number?
Did you sign in/activate?
Did you create an Adobe account? -
What's happening with EE's signal? Its been out most of the time from 12/06
Hi.What's happening with EE's signal? Its been out most of the time from 12/06
Hi ,
There is a fault logged with a mast in your area and our engineers are working to get it back up and running as soon as possible.
We are are very sorry for the inconvenience in the meantime.
Thanks
James
Maybe you are looking for
-
Hi All, I need to understand the link between sales order item schedule line and planned GI date in delivery? (Multiple line item scenario) Schedule line in a sales order is at the item level and Planned GI date in the delivery is at the header level
-
Who can I complain to about a new order being canc...
Please can someone help me before I go totally insane!! On 14th March I placed an order online with BT for Phone & Broadband with free BT Sport and paying the line rental in advance with it due to go live on 30th March. Transfer date came and went wi
-
Problem converting air-ap1131ag-a-k9 to Lwapp
i have a person on my team who converted some autonomoous air-ap1131ag-a-k9 to lwapp. I don't think they did it right. what they did is , booted the ap ( at this point it was running in autonomous mode), set the ip to 192.168.1.200 and their laptop t
-
Dear SAP Guru, In the time of GR via MIGO, I did not tick "Print via Output Control". Now I want to take a print. How do I get the print out. Thanks for your kind advance co-operations. Best Regards, Shoyeb
-
I want to delete a Parameter but it won't let me...
I want to delete the parameter @Subtitle but it won't let me. It has a green check mark beside it and in the Report definition it has the following. How do I find where this is and delete it? CR 8.5 dev edition Kelvin ++++++++++++++++++++++++++++++++