How to export a continous waveform data from a while loop?
Hello there,
I need to add noise signal to my waveform which is read from a binary file. I use noise generate vi (deleted the density part) from NI example as my sub VI, and put it into a while loop in order to get the continous noise signal, but I don't know how to export this data. There's no waveform come out from the noise waveform output tunnel (on the while loop). I used output tunnel, didn't work, tried shift register, didn't work... Can anybody help?
Also, how to fix the dt problem for the noise generate vi and my original data ( from binarty file)
Thanks in advance!
Wendy
hi
I think notifier can do the trick (an example is shown in the master-slave template).
Another possibility can be a FG (or action engine, look for the nugget ActionEngine, it will change your LV-coding life !)
N
Similar Messages
-
How can I write waveform data from a while loop?
Alright, I have a NI-5122 high speed digitizer that I need to acquire 10,000 waveforms. I am currently using the NI example code "niScope EX Multi Record Fetch More Than Available Memory.vi" to do this and then onto that later. I set the Number of Records to 10,000, min record length to 8192, and the min sample rate to 100M (S/s). On the Fetch vi, I set it to get a 1D Dbl array and then send it to the while loop edge for auto indexing. What I want is to take each waveform and write it to a file next to the previous waveform not append it to the bottom of the previous one. I can do 100 and sometimes 1000 waveforms with my current setup and then use "write measurement to file.vi" to save the data, but at 10,000 it says that the memory is full. I have 256 MB on the NI-5122 and 4G of memory on my host computer. My reasoning is that if the NI-5122 can hold all that data then why can't my host computer. I have tried to fetch using 2D Dbl and transpose that matrix and send the data to "write measurement to file.vi" inside the loop and append the data that way, but when I do this the card does not acquire any data. Which seems like a software problem. I know this is probabaly worded poorly, so just post a response if further explanation is needed.
Thank you.Hello,
It sound like you might have received a LabVIEW: Memory is full message. Are you also graphing this data as it is being acquired? Are you building an array inside the loop? At the 100 MS/s rate, you are using a lot of memory to acquire, graph, build and transpose array data, and then write to file. If you are saving to file and do not necessary need to see the data, I would suggest taking the graphical indicator out of the code. Please review some of the KnowledgeBases linked below about the LabVIEW: Memory is full.
KB 36QD14V3: Why Do I Receive a "Memory is Full, VI Stopped at Loop Tunnel 0xXXXX" Error?
KB 3ZNDGRS9: LabVIEW "Memory is Full" Error
Samantha
National Instruments
Applications Engineer -
How to make the exchange of data between 2 while loop in real time
hello
I have 2 while loop
the 1st while loop includes the data acquisition program
the 2nd while loop includes the control program
my question is how to make the exchange of data between 2 while loop in real time
I tried with the local variable and direct wiring between the 2 while loop
it does not work (there is a delay)
Solved!
Go to Solution.Bilalus,
Queues are only good to transfer data if your application isn't deterministic. Since you are using Real Time, I am assuming that your application requires determinism. If you are using Timed Loops and you use queues to transfer data between your loops, you are losing determinism. In this case, you need to use the RT FIFO functions.
Warm Regards,
William Fernandez
Applications Engineering
National Instruments -
How to export message body and data from Table to Excel from outlook 2010
I usually get Employee announcement in emails and I need to compile excel sheet from all these emails to know change in status of employee from previous line to current line .
Dear Concerned,
The change in status of the following employee has been carried out as per following details:
New Status
Change in Job
Effective Date
01-Feb-2015
Employee Name
Ricky ponting
Employee Code
4982
Designation
Sourcing Executive (Secondment)
Job Group
1A
Department
Sourcing & Supply Chain
Unit
Technology Sourcing
Division
Finance
Location
sydney
Reporting Line
Mr Micheal king
Note: Ricky Ponting was previously working as
Tariff Implementation Support Officer XYZ organization was reporting to
Mr Robin Sing
I need working code that export about HTML table data as well last Note : full line so that I can have an excel file of 2000 Employees whoes status have been changed and I can easily sort out from which previous line they were reporting to new line and I
can get in touch with the new line for any Access rights re-authorization exercise on later stage .
Currently i am using following code thats working fine with the table extraction but NOTE: line is not being fetched with the following code based on following URL
https://techniclee.wordpress.com/2011/10/29/exporting-outlook-messages-to-excel/
Const MACRO_NAME = "Export Messages to Excel (Rev Sajjad)"
Private Sub ExportMessagesToExcel()
Dim olkFld As Outlook.MAPIFolder, _
olkMsg As Outlook.MailItem, _
excApp As Object, _
excWkb As Object, _
excWks As Object, _
arrCel As Variant, _
varCel As Variant, _
lngRow As Long, _
intPtr As Integer, _
intVer As Integer
Set olkFld = Session.PickFolder
If TypeName(olkFld) = "Nothing" Then
MsgBox "You did not select a folder. Operation cancelled.", vbCritical + vbOKOnly, MACRO_NAME
Else
intVer = GetOutlookVersion()
Set excApp = CreateObject("Excel.Application")
Set excWkb = excApp.Workbooks.Add
Set excWks = excWkb.Worksheets(1)
excApp.Visible = True
With excWks
.Cells(1, 1) = "Subject"
.Cells(1, 2) = "Received"
.Cells(1, 3) = "Sender"
.Cells(1, 4) = "New Status"
.Cells(1, 5) = "Effective Date"
.Cells(1, 6) = "Employee Name"
.Cells(1, 7) = "Employee Code"
.Cells(1, 8) = "Designation"
.Cells(1, 9) = "Job Group"
.Cells(1, 10) = "Department"
.Cells(1, 11) = "Unit"
.Cells(1, 12) = "Division"
.Cells(1, 13) = "Location"
.Cells(1, 14) = "Reporting Line"
.Cells(1, 15) = "Note:"
End With
lngRow = 2
For Each olkMsg In olkFld.Items
excWks.Cells(lngRow, 1) = olkMsg.Subject
excWks.Cells(lngRow, 2) = olkMsg.ReceivedTime
excWks.Cells(lngRow, 3) = GetSMTPAddress(olkMsg, intVer)
For intPtr = LBound(arrCel) To UBound(arrCel)
Select Case Trim(arrCel(intPtr))
Case "New Status"
excWks.Cells(lngRow, 4) = arrCel(intPtr + 1)
Case "Effective Date"
excWks.Cells(lngRow, 5) = arrCel(intPtr + 1)
Case "Employee Name"
excWks.Cells(lngRow, 6) = arrCel(intPtr + 1)
Case "Employee Code"
excWks.Cells(lngRow, 7) = arrCel(intPtr + 1)
Case "Designation"
excWks.Cells(lngRow, 8) = arrCel(intPtr + 1)
Case "Job Group"
excWks.Cells(lngRow, 9) = arrCel(intPtr + 1)
Case "Department"
excWks.Cells(lngRow, 10) = arrCel(intPtr + 1)
Case "Unit"
excWks.Cells(lngRow, 11) = arrCel(intPtr + 1)
Case "Division"
excWks.Cells(lngRow, 12) = arrCel(intPtr + 1)
Case "Location"
excWks.Cells(lngRow, 13) = arrCel(intPtr + 1)
Case "Reporting Line"
excWks.Cells(lngRow, 14) = arrCel(intPtr + 1)
Case "Note:"
excWks.Cells(lngRow, 14) = arrCel(intPtr + 1)
End Select
Next
lngRow = lngRow + 1
Next
excWks.Columns("A:W").AutoFit
excApp.Visible = True
Set excWks = Nothing
Set excWkb = Nothing
Set excApp = Nothing
End If
Set olkFld = Nothing
End Sub
Private Function GetSMTPAddress(Item As Outlook.MailItem, intOutlookVersion As Integer) As String
Dim olkSnd As Outlook.AddressEntry, olkEnt As Object
On Error Resume Next
Select Case intOutlookVersion
Case Is < 14
If Item.SenderEmailType = "EX" Then
GetSMTPAddress = SMTP2007(Item)
Else
GetSMTPAddress = Item.SenderEmailAddress
End If
Case Else
Set olkSnd = Item.Sender
If olkSnd.AddressEntryUserType = olExchangeUserAddressEntry Then
Set olkEnt = olkSnd.GetExchangeUser
GetSMTPAddress = olkEnt.PrimarySmtpAddress
Else
GetSMTPAddress = Item.SenderEmailAddress
End If
End Select
On Error GoTo 0
Set olkPrp = Nothing
Set olkSnd = Nothing
Set olkEnt = Nothing
End Function
Function GetOutlookVersion() As Integer
Dim arrVer As Variant
arrVer = Split(Outlook.Version, ".")
GetOutlookVersion = arrVer(0)
End Function
Function SMTP2007(olkMsg As Outlook.MailItem) As String
Dim olkPA As Outlook.PropertyAccessor
On Error Resume Next
Set olkPA = olkMsg.PropertyAccessor
SMTP2007 = olkPA.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x5D01001E")
On Error GoTo 0
Set olkPA = Nothing
End Function
Sub DebugLabels()
Dim olkMsg As Outlook.MailItem, objFSO As Object, objFil As Object, strBuf As String, strPth As String, arrCel As Variant, intPtr As Integer
strPth = Environ("USERPROFILE") & "\Documents\Debugging.txt"
Set olkMsg = Application.ActiveExplorer.Selection(1)
arrCel = Split(GetCells(olkMsg.HTMLBody), Chr(255))
For intPtr = LBound(arrCel) To UBound(arrCel)
strBuf = strBuf & StrZero(intPtr, 2) & vbTab & "*" & arrCel(intPtr) & "*" & vbCrLf
Next
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFil = objFSO.CreateTextFile(strPth)
objFil.Write strBuf
objFil.Close
Set olkMsg = Application.CreateItem(olMailItem)
With olkMsg
.Recipients.Add "[email protected]"
.Subject = "Debugging Info"
.BodyFormat = olFormatPlain
.Body = "The debugging info for the selected message is attached. Please click Send to send this message to David."
.Attachments.Add strPth
.Display
End With
Set olkMsg = Nothing
Set objFSO = Nothing
Set objFil = Nothing
End Sub
Function StrZero(varNumber, intLength)
Dim intItemLength
If IsNumeric(varNumber) Then
intItemLength = Len(CStr(Int(varNumber)))
If intItemLength < intLength Then
StrZero = String(intLength - intItemLength, "0") & varNumber
Else
StrZero = varNumber
End If
Else
StrZero = varNumber
End If
End FunctionDear Graham
I am already big fan of yours and using mail to many Addin from years from word 2007 to Word 2010 :) and still loving it and I use it for access re-authorization from Lines for application accesses . I tried and finally got understanding of the Extract to
mail Addin and after tweaking excel - Text To columns and other few things finally i was able to get the required data - from morning to now :) I am happy to see your provided guidance
Thanks alot - by the way why your Mail to many add-in is so slow now these days :) previous versions usually help me send 1000 emails in 10 minutes now it takes long time :) -
How to export the single cube data from SAP repository
Hi ,
I have a requirement to export the single cube data ( there was so many cubes in the SAP repository) as an XML file or a .csv file or a flat file.
And also looking for how to do cube quering?
Thanks in advance ,
Ramakrishna ThotaHI RK,
1. You can use Open Hub service to export data into CSV or File Format.
2. You can also use RSCRM_REPORT transaction to export data in to File, for this you need to create query first.
3. You can also use APD to generate file of your cube data.
thanks
Ramesh Babu -
Getting data from a while loop while running.
Hello,
I did a program that call a sub-VI which is doing experiment and have its own timer.
The sub-VI is a while loop and the stop condition of this loop is the elapsed time of my timer.
What I want to do is to be able to get the elapsed time in my main program during the execution of the sub-VI (every second of its execution).
First I assign the elapsed time in the sub-VI as an output of it. But of course the elapsed time is only updated in the main VI only when the while loop has finished. So I tried several solution: property nodes, local variable, global variable.
When I am using global variable, I can see the elapsed time being updated during the while loop when I open the global variable VI. But the result is always the same: in the main VI the elapsed time is only updated at the end of the while loop.
I think that is the global variable is updated every time, I could be able to get its data to my main VI?
Does anyone have an idea?
Thank you,
MeachI tried using shared variable and reference without succes.
I will keep searching.
I enclose my VI that I simplify the most but with still keeping the shape of my real program. If you can take a look I will really appreciate.
The goal is on the top-level VI to be able to see the updating data time in real time.
Thanks,
Meach
Message Edited by Meach on 07-23-2008 04:13 PM
Message Edited by Meach on 07-23-2008 04:14 PM
Attachments:
Elapsed Time.zip 25 KB -
How to export a table of data from MS Access 2007 to Oracle 11g
I have been looking all over trying to find a way to get a table from Access 2007 to Oracle 11g. I tried using the export options in Access but can't get them setup correctly I guess. What are the steps to setting this up correctly or is there another way to export the data?
MS Access 2007 DB migration To oracle 10g
-
How to export images with meta data from iPhoto?
Hi
I have about 4000 family photos which have been scanned and imported to iPhoto. They are all dated the same day, naturally. I'm now in the process of adding metadata to every photo: location, faces, time and year, file name and description.
Once I have gone through every photo, I will put them into albums based on events and the meta data above.
Eventually, I will want to share all these photos with people who should like to see them (and who are not tech savvy...) I'm looking for the best approach to do to this.
1. Will all the metadata that I have added remain in the photos when I export them?
2. What exactly is the best approach to export these 4000 photos?
- As I have gone through all the hard work of sorting the photos in albums, is it possible to export these photos in the albums that they already in?
I hope to hear from someone out there. Thanks a lot
Best wishesYou need to have an application like EXIF Viewer for Mac OS X to check the files once you've exported them with the various checkboxes checked:
Happy Holidays -
Saving all data from a while loop
I already asked a similar question but it might not be very clear and there were some concepts that I could not well understand.
1. I have a key pad to generate DTMF stream signal (I call it stream because it contains multiple tones which make up of a complete phone number)
2. I would like to save it as a wav file but I guess other format is okay and because the write to wav file does not support append so for this particular case, I use write to waveform instead of write to wav
My approach is to have a queue structure so I can write each iteration result to a file.
i)When I try to retrieve the data, there is nothing but 0.
ii)my intention is to get 8000 sample per second (fs = 8,000) but it save the data so fast
I attached the file so if there is way to solve the problems, please help me.
Solved!
Go to Solution.
Attachments:
SignalGenerator.vi 52 KBI believe what is happening is that your producer loop is iterating even when there is no key press and sending blank or default data to the consumer and overwriting the test.wav file.
Easy way around this is to put an event structure in the producer that only enqueues data when there is a key press. I can't see into the Mathscript node so I'm not sure what's going on there, but I suspect the default output (e.g all of the Booleans are false) is for zero-length arrays on f1 and f2 and this is getting enqueued and overwrites any real data that might have been in test.wav.
It should be possible to append to a .wav. I have attached a proposed method. Caution that this in your consumer will take longer and longer as the file grows as it needs to read in the file every time.
Attachments:
Untitled 3.vi 8 KB -
How to export the text edit data to excel file without splitting the data in excel file?
how to export the text edit data to excel file without splitting the data in excel file?
I have a requirement in SAP HR where in the appraiser can add comments in the area given and can export that to excel file. Currently the file is getting exported but the comments getting split into deifferent rows.
I want the entire comment to be fit in one row.
Please help.
Thank youHi,
if your text edit value is stored in 'lv_string' variable.
then before exporting the value to excel you have to remove CL_ABAP_CHAR_UTILITIES=>NEWLINE
that is '#' from the variable lv_string.
for that use code some thing like this.
REPLACE ALL OCCURRENCES OF CL_ABAP_CHAR_UTILITIES=>NEWLINE in lv_string WITH space.
I think this will do the trick. -
How to exp a specific partition data from a partitioned table
Thanks in advance.
Is is possible to export a specific partition data from a partitioned table? If so Please describe how with an example. Thank You.You would specify a partition with the table_name:partition_name syntax at the TABLES parameter.
See examples at
http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/exp_imp.htm#CEGCJABJ -
How do I transfer my email data from windows live to my mac
How do I export all my email data from my old PC which was running on Windows Live, to my Mac
To access a web based email service you just need to go to the site and log in. There will be nothing to transfer.
-
How do i repair or recover data from a corrupt USB external hard drive that does not show up on my Mac desktop or disk utility?
Last night i was using my external hard drive, for some reason the folder just closed and i couldn't find it on my desktop.
After googling solutions, i found it in the disk utilities, i clicked on the 'repair' button many times, but it said the 'error...' message.
So i ejected it to try again, now when i connect the USB external hard drive it doesn't show up on my desktop or disk utilities.
I really just want to either repair or recover the data on it because it literally has everything (documents, work files, photos etc) on it,
I downloaded an application to recover my files but it needs the USB to at least show up.recognise it which mine doesn't.
I know i should've backed it up on another USB, this definitely teaches me for next time to back up all my files.
Are the files lost forever or can i recover them by going to a shop or using a software?Thank you for responding.
This might sound stupid since i'm not really knowledgeable with Macs,
but since all my files were moved from my mac computer to the external hard drive,
is it possible to recover those files through my Mac - like recovering deleted files? -
How can I restore the game data from an old ipod touch to a new one?
How can I restore the game data from an old ipod touch to a new one?
Restore it from the backup of the old ipod.
-
I have forgotten my password for icloud, have an invalid email address and do not know my security answers. How can I transfer all my data from my old iphone to the new one?
In this case you won't be able to do that?
Maybe you are looking for
-
How to install SQL server 2008 express on Windows server 2008 R2 standard OS
Hi, I have Windows server 2008 R2 Standard edition (64-bit) and trying to install SQL server 2008 express edition since I do not have SQL server 2008. When I install it I am unable to see Management Studio so I am trying to install management studio
-
How do I change an IMAP MacMail acct. to a POP acct on my iMac?
Hello, I have an iMac OS 10.6.8 and am using MacMail through AT&T (I know, yuck). Today I created a new macmail account. I noticed it automatically created an IMAP account. I also noticed the incoming and outgoing mail servers didn't match my other e
-
Where can i buy chip MCP79 for macbook pro 13 ??? It was down(
Have a good day, deer mac users & specialists. Where can i buy chip MCP79 for macbook pro 13 ??? It was down( I'm ready to buy this item from us or other countryes. Thanks.
-
My first generation AppleTV will not sync with iTunes anymore. I get an error message that says: "The Apple TV is not responding Check that any firewall software running on this comptuter has been set to allow communication on port 3689" firewall i
-
Hi All, This is the situation.. Data cache = 3mb (default) Data block size = 20kb so number of blocks a memory segment (data cache) can hold is 157 What will happen If user is retrieving 300 blocks in one retrieval ? I know swapping will takes place