Two harmonic signals with time difference to one modulated signal
Hi LabView experts,
I'm not realy good in using lab view, but I need the visualisation for my diploma thesis.
I know how to creat a sin wave and I know how to creat a modluated signal out of to different sin waves.
but I want to creat a modulated signal where the HF signal is starting later.
So first you have the low frequency sin wave and maybe after one sec. the high frequency signal will be modluated on top.
It would be great if someone could tell me how to do that.
unfortunately I'm using labview 7.1 so I will not be able to open newer files..
thank you very much!!
It's a bit long to explain what you did wrong..
First thing.. STAY AWAY FROM STACKED SEQUENCES!!! Sorry for shouting! But I keep praying that NI will remove those horrible things!
Stacked Sequences are annoying because they make you loose sight of the dataflow that goes on inside the code. Forcing sequential actions is not a good thing in Labview.
Have a look at the attached code. It will do what you wanted. It can still be improved, such as changing the For Loop to a While Loop and have the graph update as run run the VI, instead of a fixed number of iterations.
Let me know how it goes..
RayR
Message Edited by JoeLabView on 06-13-2008 08:43 AM
Attachments:
modulation.vi 30 KB
waveform.PNG 22 KB
Similar Messages
-
How to solve the problem with time difference?
Hi,
I work in India with time difference about 12 hours faster than American time.
I put a validation in my application as follows:
IF :P2_FINISH_DATE > SYSDATE THEN
return false;
else
return true;
end if;
Today (13-Mar-09) at 9:30 am according to my system, I entered 13-Mar-09 as FINISH_DATE.
But it returned false with an error message: "Finish date cannot be greater than system date."
I changed my system time as 13-Mar-09, 9:30 pm. Then it accepted 13-Mar-09 as FINISH_DATE.
How can I solve this issue.
Would appreciate your help.
Thanks,
GuyHi Arie,
Thanks for the code.
Your code works perfect in SQL Commands.
But I don't know how to use the code in my application.
Would appreciate if you can help me know the followings:
- How to define two application processes -- before header and after submit (before any processing) – with the proper alter session statement.
- How to use the APEX VPD field to do the same.
FYI, I use the following codes:
- For file upload
If (:p2_SUBMIT_FILE is not null) then
insert into PM_DOCUMENT (id, name, blob_content, mime_type, PROJECT_NAME, SUBMIT_TIME, SUBMITTED_BY)
select id, :p2_SUBMIT_FILE, blob_content, mime_type, :P2_NAME, SYSDATE , :P2_UPDATED_BY
from apex_application_files
where NAME = :p2_SUBMIT_FILE;
Delete from apex_application_files where name = :p2_SUBMIT_FILE;
end if;
- For Data entry validation
IF :P2_START_DATE > :P2_FINISH_DATE
OR :P2_START_DATE > :P2_TARGET_DATE
OR :P2_FINISH_DATE > SYSDATE THEN
return false;
else
return true;
end if;
Thanks,
Guy -
How can I split a backup on two hard drives with Time Machine ?
Back-up of my Imac with time machine is 1,3 TB. I have two 1 TB external hard drives but even if I had both as available in Time machine, it seems it doesn't allow to split the backup between the two hard drives. Any way to resolve this without buying another hard drive with more space?
Thanks in advanceYou cannot directly split a backup. Your only option would be to open the TimeMachine preferences from System Prefs. and add things to the exclusion list for one of the backups. Then, when you go to do the other backup you would reverse the process and add everything else to the exclusion list and remove the things you had on there in the first place.
Seems fairly intensive though when you could just go and buy a 2 or 3TB external drive and do it all in one...Black Friday is coming up
Regards, -
Two channels recoring with time lag
I am trying to make an application where I want signals from 2 channles to be displayed on the screen. One of them is the preset speed (Vs time) trace and the other would be the actual speed of the vehicle (Vs time). My objective is to make some sort of a drivers aide where the driver of the vehicle can see on the screen the speed trace he is supposed to follow. I would also like to have a programable time lead (atleast one min time lead)for the preset speed trace so that the driver knows ahead of time what he is supposed to do (accelerate or decelerate. I think I can write a simple program to display the signals, but the tricky part of it to give this time lead to one of them. I am using a SCXI 1000 chasis with a 1100 module and a 60
31E DAQ card. Please help.The easiest way to put in a delay would be to actually use a "wait" vi within a sequence structure. For example, if you have the preset speed coming in on AI0 and the actual speed coming in on AI1, you can display the actual speed right away in an indicator or waveform graph. I would then use a sequence structure to store the values of AI0 in an array -> wait N ms -> display these values on an indicator or waveform graph.
-
Time difference between one Ext Trig and multiple secondary triggers ?
An external device generates a 100 Hz square wave (primary). During
each 10 msec period, another device (secondary) generates multiple
pulses at random times. I want to determine the time, with respect to
each primary waveform's leading edge, when each and every of the
secondary pulses occurs. Not just the first secondary pulse.
Count Buffered Edges.vi example records times when multiple secondary
pulses occur, but there does not seems to be a way to set the counter
value to zero by the primary pulse (especially on STC cards).
The TIO example Two Edge Separation.vi only measures time between the
primary pulse and the first secondary pulse, not all secondary pulses.
The TIO Measure Position.vi fo
r encoder use mentions using the Z-index
on the gate pin to initialize the count value. Is there a way to
combine this with ability to record multiple buffreed time differences
I envision each 100 Hz leading edge resetting a counter (which is
counting a high frequency time base) to zero. Then each secondary
pulse latches that counter's value into memory.
For each count latched by the secondary pulses, it is not necessary to
know within which specific primary period it belonged to.
An alternative is to use two of the Count Buffered Edges.vi and record
the times of both primary and secondary pulses and take their time
difference in software.Answered on another thread...
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HFORCEKWTID=75037:5&HOID=5065000000080000009EA20000&HExpertOnly=&UCATEGORY_0=_32_%24_12_&UCATEGORY_S=0
Ron -
CS 5 exports two pages at a time instead of one.
I copied the following script from the Internet into notepad, saved it, and renamed it "spreads.jsx". I put it into my scripts file. It didn't do anything. app.interactivePDFExportPreferences.exportReaderSpreads = !app.interactivePDFExportPreferences.exportReaderSpreads
I removed the facing pages check. My pages still exported two pages to a page. I then created a new document without the facing pages checked. I copied the 21 of my original file into the new file. It still exported two pages on one.
>The only way to get non-facing pages to stick together is to disable page shuffling and drag them together in the Pages Panel, and that
won't happen accidentally.
I turned off shuffling, and that didn't help either. It was unclear what to drag in the Pages Panel.
I'm now past my deadline for the newsletter and can use anybody's help so that I get an output in .pdf for single pages, so people can print out the file and have a single page on a single sheet.
Lou
First, here is my screen shot of the resulting .pdf file from exporting my 21 page document
Second, here is the screen shot of my pages panel.
Next, the export dialogue:
Here is the scripts dialogue box.Someone, maybe you, suggested I start a new thread about the video. I
posted it to the forum under:
"I solved the export single page issue and now my videos won't work." Here
is the text:
I have windows 7 for 64 bit.
I ran a script on my InDesign CS 5 document to solve the problem with two
pages appearing on one .pdf file. When I clicked on it, here is what I
get “Spreads are now ON in Interactive PDF Preferences.”
I get two pages stuck together in my interactive .pdf file. I don’t want
that because it prints to pages on a single sheet and I want each page to
print separately. However, my three .f4v videos appear the way I want and run
perfectly, even though I got the error message, “One or more interactive
elements are clipped in ways that PDF files cannot reproduce. Those elements
will be adjusted in the exported PDF. “
When I click on the script again, it says, “Spreads are now OFF in
Interactive PDF Preferences.”
The pages are the way I want. Now my videos don’t behave. Video 1 vanished
into a red border with blank inside. Video 2 has moved half way up the
page, covering two photos, but it plays. Video 3 has just white space in its
position.
Next, I tried another script. When I ran it I got the message, “Shuffling
pages will remove some page transitions. To avoid this message in the
future, uncheck allow Document Pages to Shuffle in the Pages panel. Select OK to
continue.” I hit okay several times and the message kept appearing again
and again. I finally clicked “Don’t show again” and it went away. I got the
same error message as before. The videos are all screwed up, like before.
I toggled that script and exported again, and got the same error message.
This time, as before, the videos were messed up, but this time one of the
videos was off the page, but played.
Is there any way I can keep one page to one in the .pdf AND have my videos
work?
Lou
In a message dated 6/27/2011 7:39:51 A.M. US Mountain Standard Time,
[email protected] writes:
Lou,
In order to properly diagnose your problem it is ESSENTIAL that ID is
behaving in a known and predictable way. This means that if you ran the
first script, the one that Stix recommended, and ran it only once and then
deleted it, you MUST reinstall the script, and run it again to reset the
export behavior to spreads so we know what's going on. You should see a
new
dialog telling you that exporting spreads is active when the script runs.
Until you do that, we really can't tell where the problems with things
moving might be coming from.
I design for print, and I've been working with InDesign since it was first
released, switching my production work from Quark Xpress to InDesign when
ID
2.0 was released about 10 years ago. Before going freelance as a designer
I
worked a few years in print shops learning from other people's mistakes
(and
learning how to fix most of them), and did some newspaper and magazine
production. Quite a bit of what I know about InDesign I've actually
learned
here. For the first few years I read every post, and if I didn't already
know the answer I tried to figure it out. Even now, though, I usually
learn
something new at least once a week.
As I just mentioned, I design for print, so the interactive stuff is a bit
murky for me, too, but if we can get you to a known state and see if
things
are where they belong, someone who does interactives all the time may be
able to help more. I don't know about the warning you get, but I suspect
it
is significant. -
Two usb webcams with YUYV format on one usb hub
I'm trying to launch two cams from VLC, guvcwiev and all I get is error. I think this is why - http://superuser.com/questions/431759/u … s-in-linux
"If the only pixel format returned is "YUYV", "IUYV", "I420", or "GBRG" you'll only be able to run one camera per USB controller* since those formats are uncompressed. Using multiple webcams which support MJPEG or some other form of compression will work fine.
*Unless you're happy with 320x240 resolution or lower."
Question is
I think I will be happy with two cams running 320*240 resolution. How can I change their resolution and launch them?
I've tried change it in guvcview but getting same error. On two different hubs it runs okay.
Here's lsusb and v4l2-ctl -d /dev/video2 --list-formats
lsusb
Bus 002 Device 007: ID 1871:0101 Aveo Technology Corp. UVC camera (Bresser microscope)
Bus 002 Device 006: ID 1871:0101 Aveo Technology Corp. UVC camera (Bresser microscope)
v4l2-ctl -d /dev/video2 --list-formats
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: 'YUYV'
Name : YUV 4:2:2 (YUYV)
Last edited by imm_yohan (2014-06-05 12:27:31)yes, altho my problem is not exactly the same, i too am having a hard time configuring my 2 USB webcams (Logitech 905s) in 10.6.4! i use Camtwist but i can't even get the cameras to produce an image!
-
Generate two sine waves with time delay
I have not been using the waveform generation tools so I hope this is an easy one for somebody. I want to create two sine waves at different frequencies say F1 = 1.00 KHz and a second at F2 = 1.20 KHz. I know that to combine them into one I can just add them. Them problem I have is that I want F1 to start first then a few millisecond later have F2 sum into F1.
T0 = F1
T0 + Delay = F1 + F2
Is there a VI capable of a time delay? Tried to sum individual signals together but seems more difficult because of the waveform cluster format.
Any help is appreciated,
Matt
Matthew Fitzsimons
Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and VisonWould the attached VI work for you?
Attachments:
Add Delayed Sinewave.vi 54 KB -
I should calculate the difference between two times.and store it in database..
My code is:
long ms = (from.getTime() - to.getTime());
java.sql.Time nohrs = new java.sql.Time(ms);Suppose let from = 12:20:36
to=12:20:26
I should get 00:00:10 but what I am getting is 5:30:10
I think its taking GMT time,how to avoid thisHope I am not too late in answering this !
The problem is new java.sql.Time(ms) will calculate the TIME WITH CORRESPONDS TO milliseconds since January 1, 1970, 00:00:00 GMT, so in your example it is
new java.sql.Time(10000) ie January 1, 1970, 00:00:10 GMT and it will converted to your time zone. ie January 1, 1970, 05:30:10 .
this can be adjusted / solved by subtracting the milliseconds correcponds to your time zone , using .getTimezoneOffset().
here is the piece of code i used, use after proper checking if needed
public class testTime { public static void main(String arguments[]) throws Exception {
Date from = new Date(2005 , 7 , 19 , 12 ,20 , 36);
Date to = new Date(2005 , 7 , 19 , 12 ,20 , 26);
long ms = (from.getTime() - to.getTime());
long msNew = (from.getTime() - to.getTime() + (new Date().getTimezoneOffset() * 60 * 1000 ));
java.sql.Time nohrs = new java.sql.Time( ms );
java.sql.Time nohrsNew = new java.sql.Time( msNew );
System.out.println(nohrs);
System.out.println(nohrsNew);}}
========my result ===============
C:\MATHAI\works\tests>java testTime
01:00:10
00:00:10 -
Two hard drives with time machine?
I have two external hard drives: one at work, and one at home. Can I have time machine running on both, so that I have a complete backup in both places? If so, how?
Sure. Each will be complete, but independent, if that makes sense.
You will have to tell TM each time you swap them, however, via TM's Preferences > Change Disk.
The first time you do a backup to each, it will be a full one, of everything on your system. When you swap, the next backup on the swapped drive will be lengthy, but contain all the changes since the last backup to that disk.
Do be careful, however, not to go more than about 10 days without a backup to each disk, as TM may do a new, full backup after that long. -
Group by on date field with time difference of up to 1 minute
Hi,
I need to do a group by on a date field and some other fields, but want to include in the same group rows that are identical but may have a difference of up to a minute in the date field.
group by trunc(datefield,'MI') wouldn't work in cases like 00:00:50 and 00:01:10 (20 sec difference).
I can do a semi join with where exists and between on the date field, but am hoping for another solution.
any ideas?
thanks.
Edited by: Pyrocks on Sep 14, 2011 2:16 PMHi,
It sounds like you want something like this:
WITH got_new_grp AS
SELECT x.* -- or whatever columns you need
, CASE
WHEN datefield > MAX (datefield)
OVER ( ORDER BY datefield
ROWS BETWEEN UNBOUNDED PRECEDING
AND 1 PRECEDING
) + ( 1 / (24 * 60))
THEN 1
END AS NEW_GRP
FROM table_x x
-- WHERE ...
, got_grp AS
SELECT n.*
, COUNT (new_group) OVER (ORDER BY datefield) AS grp
FROM got_new_grp n
SELECT MIN (datefield) AS start_datefield
, MAX (datefield) AS end_datefield
, COUNT (*) AS cnt
FROM got_grp
GROUP BY grp
ORDER BY grp
;Of course, this makes assumptions for all the things you didn't explain.
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and the results you want from that data.
Explain, using specific examples, how you get those results from that data. Be sure to include an example like the one Kim posted, where rows a and c are more than a minute apart, but both are within a minute of row b, or are connected by a chain of rows each less than 1 minute apart from its neighbor.
Always say what version of Oracle you're using. -
In my iPhoto application when I select switch libraries It shows 2 libraries with the same name, but one has the name is in Capital letters.
They both open the same library which is in the Pictures folder. This is the only library I can see and the name is not in capital letters?
How do I get rid of the one in capital lettersWhat is your iPhoto version?
when I select switch libraries It shows 2 libraries with the same name, but one has the name is in Capital letters.
In the Library Chooser Panel look for the pathes to the two duplicate libraries. You will see the location of the libraries in the path bar at the bottom of the window when you select one of the libraries. Does it show both libraries in the same folder? -
Can't use two external drives with time machine
I have 2 external drives. I tell time machine that I have 2 and it asks if I want to use both. I say yes and it says it will alternate between them. However, after backing up to both, it then will invariably say that one doesn't have enough room for backup...as if it is trying a new backup...... rather than just adding changed files. Why is it doing this and how do I remedy?
It then will invariably say that one doesn't have enough room for backup
Unfortunately, these kinds of things are common with Mavericks. All that you can do is erase the drive and start over again with a new backup. Or, if you do not want to erase the drive, set it aside in a safe place and add a new drive....and Mavericks will make a full backup to that one to start things off. -
Is it possible to make two different backup over two external HD with time machine?
The problem:
Into my iMAC I have 1) work (text and design and photo) and 2) photo (my hobby)
Directory of work is quite light, and Time Machine is very appropriate
The directory photo is very big, many Gb, and TM cancel old backup of work and photo.
I want, if possible:
To make the backup of Works on the first external HD, excluded the files of directory Photo
To make the bacup of photo on the second external HD, excluded the files of directory Works
Thanks,
architettomarioUsing TimeMachine you can have more than one backup drive but only set up a single set of exclusions. To do what you want to do will require another backup program. For example you might use TimeMachine to back up your documents and then another program, such as ChronoSync, to back up just your photos.
-
Problem with time if some one call me
Hi every one .. First my english isn't very well
the problem is if iphone is locked then some one call me i can't know what is the time now because the clock doesn't show .. like this picture in this URL
http://img69.imageshack.us/img69/5495/img0397y.jpg
are there any program or some thing let the clock show during iphone is locked ?
thanksSuggest you slide the lock........or..........buy a cheap watch.
Maybe you are looking for
-
After upgrading to ios5.1, I no longer can use my uconnect on my truck
It all worked just fine until I upgraded. But now when I make a call, it all goes through the truck speakers just fine, until the phone starts ringing. Then it won't allow me to speak or listen through the truck. I have to hold the phone to my ear.
-
Why Can't I get the slideshow to work in iWeb?
I recently created and purchased a photo book successfully. I made a pdf of the book and saved it to iPhoto. I can't get the slideshow to work. Keeps telling me to drag photos somewhere, but they are already posted. If I click I can get to the spot w
-
Checking resolution in a PDF image
This might be more of an Acrobat question, but is there an easy way to check the resolution of an image that was done in Illustrator and is now sent to you as a PDF? Thanks.
-
We have a large TestStand project with multiple development PCs and developers. We are using Perforce to source control and share our work. We have created some custom type files which are in the Teststand\Components\User\TypePalettes directory whic
-
Hi, I have set distribution cycle (KSV1) and when the cycle is run (KSV5) I get error message GU444 - No information was found. I use SAP 600 with support package SAPKH60013. Have someone met something like that whenever. I have implemented SAP notes