How do I make a program to loop a video feed in LabVIEW 8.0?
Hello everyone I am needing a LOT of guidance here. I am a senior at Pittsburg State University in Pittsburg, KS. I have a senior design project that I am basing around LabVIEW. My school owns LabVIEW v8.0 and I am attempting to figure it out. Here's my dilemma: My project is called an onboard vehicle camera system. I want to be able to connect a small camera such as a surveillance camera with night vision capability to a single board computer with LabVIEW installed on it. Also, I want to connect an accelerometer and a light sensor to the computer. While the car is running, I want the camera to record video with 5 minute loops. After a loop is over, the computer will record over the previous 5 minutes, therefore saving storage space. When the accelerometer senses a drastic change in velocity, the single-board computer will know NOT to record over the current 5 minute loop, enabling the owner to review what was recorded and determine the cause of the accident. My biggest problem is that I need a computer simulation for this by MONDAY for class, but I haven't even started yet! I have taken a few tutorials that comes with the software but I am still lost. Thanks to anyone who is willing to help!
--John
CXB wrote:
This depends on your sensors and your single-board computer.
Which sensors have you picked out? Are the all analog? Do they require excitation? Are you looking for a PCI interface or USB interface for the computer?
When you have some of these parameters narrowed down, you can look at http://www.ni.com/dataacquisition/ for our data acquisition hardware.
Well I don't exactly have a SCB yet.. The sensors will more than likely be analog and will require excitation... I have access to a data acquisition board which I haven't messed with yet, I was just told we have one here at school. We would prefer USB interface but I'm not familiar with what I can or can't use..
Similar Messages
-
How do I make this program generate a new problem once the button is hit
Here is the code... appreciate any help given
How do I make this program generate a new set of problem when the "NEXT" button is clicked and continue until the END button is hit
package javaapplication3;
import java.awt.GridLayout;
import java.awt.Window;
import javax.swing.*;
import java.awt.event.*;
* @author Sylvester Saulabiu
class Grid extends JFrame{
final int score = 0;
final int total = 0;
Grid(){
//Set Layout of Flashcard
setLayout(new GridLayout(4, 4, 2 , 2));
//Create Panels
JPanel p2 = new JPanel();
JPanel p3 = new JPanel();
final JPanel p1 = new JPanel();
//Create Radio buttons & group them
ButtonGroup group = new ButtonGroup();
final JRadioButton ADD = new JRadioButton("Addition");
final JRadioButton SUB = new JRadioButton("Subtraction");
final JRadioButton MUL = new JRadioButton("Multiplication");
final JRadioButton DIV = new JRadioButton("Division");
p2.add(ADD);
p2.add(SUB);
group.add(ADD);
group.add(SUB);
group.add(MUL);
group.add(DIV);
p2.add(ADD);
p2.add(SUB);
p2.add(DIV);
p2.add(MUL);
//Create buttons
JButton NEXT = new JButton("NEXT");
JButton END = new JButton("End");
//Create Labels
JLabel l1 = new JLabel("First num");
JLabel l2 = new JLabel("Second num");
JLabel l3 = new JLabel("Answer:");
JLabel l4 = new JLabel("Score:");
final JLabel l5 = new JLabel("");
JLabel l6 = new JLabel("/");
final JLabel l7 = new JLabel("");
//Create Textfields
final JTextField number = new JTextField(Generator1());
final JTextField number2 = new JTextField(Generator1());
final JTextField answer = new JTextField(5);
//Add to panels
p1.add(l1);
p1.add(number);
p1.add(l2);
p1.add(number2);
p1.add(l3);
p1.add(answer);
p1.add(l4);
p1.add(l5);
p1.add(l6);
p1.add(l7);
p3.add(NEXT);
p3.add(END);
//Add panels
add(p2);
add(p1);
add(p3);
//Create Listners
NEXT.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
int answer1 = 0;
//Grab the numbers entered
int numm1 = Integer.parseInt(number.getText());
int numm2 = Integer.parseInt(number2.getText());
int nummsanswer = Integer.parseInt(answer.getText());
//Set the score and total into new variabls
int nummscore = score;
int nummtotal = total;
//Check if the add radio button is selected if so add
if (ADD.isSelected() == true){
answer1 = numm1 + numm2;
//otherwise check if the subtract button is selected if so subtract
else if (SUB.isSelected() == true){
answer1 = numm1 - numm2;
//check if the multiplication button is selected if so multiply
else if (MUL.isSelected() == true){
answer1 = numm1 * numm2;
//check if the division button is selected if so divide
else if (DIV.isSelected() == true){
answer1 = numm1 / numm2;
//If the answer user entered is the same with th true answer
if (nummsanswer == answer1){
//add to the total and score
nummtotal += 1;
nummscore += 1;
//Convert the input back to String
String newscore = String.valueOf(nummscore);
String newtotal = String.valueOf(nummtotal);
//Set the text
l5.setText(newscore);
l7.setText(newtotal);
//Otherwise just increase the total counter
else {
nummtotal += 1;
String newtotal = String.valueOf(nummtotal);
l7.setText(newtotal);
//Create End listener
END.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
// get the root window and call dispose on it
Window win = SwingUtilities.getWindowAncestor(p1);
win.dispose();
String Generator1(){
int randomnum;
randomnum = (1 + (int)(Math.random() * 20));
String randomnumm = String.valueOf(randomnum);
return randomnumm;
public class Main {
* @param args the command line arguments
public static void main(String[] args) {
// TODO code application logic here
JFrame frame = new Grid();
frame.setTitle("Flashcard Testing");
frame.setSize(500, 200);
frame.setLocationRelativeTo(null);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}Edited by: SirSaula on Dec 5, 2009 4:39 PMExtract code into methods, so that when an action is performed a method is called. That way you can reuse the method for purposes such as resetting textfields to their default values, scores to default values, etc.
You can go one step further and seperate the GUI layer from the processing layer, by deriving classes that for example maintain and calculate a score.
Mel -
How do i make a page to loop instead of changing to another page automatic ?
Hello,
I wrote an actionscript website
The website has a few pages.
The problem in my site is that after 13 seconds the homepage change
To another page.
How can i make the homepage to loop instead of changing to another page automatic?
My website address is : http://www.adiys.co.il/hilel_website.html
(Written in hebrew)
Thanks very much for your help,
MennyThe problem could be one or more from a long list. When you run your movie in Test Movie... do you get any errors? If you are using the timeline, is your first section 13 seconds long? Some of your navigation at the top seems to work, but some doesn't, so it's hard to tell what is supposed to happen.
It would help a great deal to see the actual .fla file that you are using. -
How can I make my program Run forever?
I would like to know how can I make my program execute some method while the GUI still open. I have something like this.
public static void main(String args[]) {
System.out.println("****************************");
System.out.println(" PACKET READER CONSOLE ");
System.out.println("****************************");
IPDetector window = new IPDetector(); // IPDetector is the JFrame
window.setTitle("IPDetector Analyzer");
window.pack();
window.show();
PortListener pl = new PortListener();// Is my portlistener class
PacketReader c = new PacketReader();
while(JFrame still open){// I dont know how to put a statemente here
pl.start();// this method reads from a port and returns a string
String cc = pl.data;// gets the string from the port listener
while(!cc.equals("")){
c.portWriter(cc);// writes the string into a file
}I want that my portlistener keeps reading all the time, and if is something in the socket information.
Should I use a thread? Any ideas? thanks.
ChrisI still not understanding how to make it thread. My main class is this one IPDetector. and it looks like this.
public class IPDetector extends JFrame {
// Declaration of the instance variables
private static ArrayofDisplay ad = new ArrayofDisplay();
private ArrayofCreators database = new ArrayofCreators();
JLabel sourceLabel;//etc..
public IPDetector() {
IPDetectorLayout customLayout = new IPDetectorLayout();
getContentPane().setFont(new Font("Helvetica", Font.PLAIN, 12));
getContentPane().setLayout(customLayout);
sourceLabel = new JLabel("Source IP Add.");
getContentPane().add(sourceLabel);
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
// I get confused here...
private boolean alive; // Do I need to declared here?
public void setAlive(boolean val) { // This one also?
alive = val;
// IPDetector Methods...
public void displayCaller(ArrayofDisplay aD){ }
public void setAndReplace(String text) { }
public void refresh(){ }
public boolean action(Event evt, Object arg){ }
//etc...
public static void main(String args[]) {
System.out.println("***********************************************");
IPDetector window = new IPDetector();
window.setTitle("IPDetector");
window.pack();
window.show();
PortListener pl = new PortListener();
PacketReader c = new PacketReader();
while (alive) {// Is this correct here?
pl.start();
String cc = pl.data;
while(!cc.equals("")){
c.portWriter(cc);
window.refresh();
cc = "";
class IPDetectorLayout implements LayoutManager {
public IPDetectorLayout() { }
public void addLayoutComponent(String name, Component comp) { }
public void layoutContainer(Container parent) { }
} -
How can i make simple program to match colors ?(photos taken by camera)
how can i make simple program to match colors ?(photos taken by camera)
Hi khaledyr,
use a "random number" and compare for ">0.5" to get a (1 or 0) signal
What exactly are you searching for?
- Hints for choosing hardware?
- How to output voltage or relais signals?
- Help on using DAQ(mx)?
- Help on generating (boolean) waveforms?
Message Edited by GerdW on 04-16-2010 08:15 AM
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome -
How do I make a program start up right when I turn my computer on?
Hello all!
Just wondering how I can make the program "iPulse" start right up when I turn my awesome computer on everyday!
Thank youAdd it to the list of login items for your account in the Accounts pane of System Preferences, or control-click/click and hold its Dock icon and set it to open at login.
(34979) -
How do you make to program the radio station on my remote contol ?
how do you make to program the radio station on my remote contol ?
Programming the radio stations (in hifi-mode) is explained in the "getting started" manual. Be aware of the fact that when you unplug the power cable all memory settings are lost.
JaDi. -
How do i make the program hold after it has created a JFrame
I have created a JFrame with which the user shall login to a server. I call this JFrame from my main method (the JFrame-class is in a separate file). My problem is that after the login-window is created and set visible, my main method continues, i would like it to wait until the user have logged in before running the rest of the code.
this i my main method:
new LoginWindow();
System.out.println("Logged in: "+Session.isLoggedin()+
"\nUsername: "+Session.getUsername());Session.isLoggedin() returns a boolean, true if user is logged in and otherwise false. class LoginWindow extends JFrame.
i have tried to use a while-loop to solve my problem:
while(!Session.isLoggedin()) { }and also
whiel(true){
if(Session.isLoggedin())
break;
}these while-loops never breaks, i have waited for about 3 min after successful login.It isn't because Session.isLoggedin() returns false, it does return true after a successful login (i've checked).
the funny thing however is if i print something in the while-loop i does break when login is finished
example:
whiel(true){
System.out.println(Session.isLoggedin());
if(Session.isLoggedin())
break;
}this code makes the program wait until the login-phase is complete but i don't want it to print "text" a few thousand times while the user is logging in. (i've used "hej" as output aswell)
Since i have no idea how long it will take for a user to log in i can't use the System.sleep(value) method.
I would really appreciate any help
Thanks in advance
//OscarSnuShogge wrote:
I am still curious about why the while-loop only breaks if i print something using System.out.println(""), i didn't think that would make a difference since the break-statement remains the same.In general you should avoid trying to use while (true) or its variants in a Swing GUI as it often messes with the EDT, the main thread that renders the GUI graphics and interacts with the user.
My problem i however partially solved by using a JDialog instead of a JFrame. I am planning on using JFrame later in the program so the problem might come back to haunt me if it isn't solved.This may not be a great idea. Usually an application has one single JFrame. Most other distinct windows a dialogs of one sort or another and should be JDialogs, not JFrames. Often better still is to use a CardLayout to swap JPanels or other components. -
How do you make a garage band loop longer
I am making a small promotional video and I'd like the loop to last two and a half minutes , the one i want to use is only 1 mnute 56 . how can i make it longer . ?
Thank you .I assume you are talking about a jingle and not a loop - because you could just loop the loop to make it longer.
To lengthen the loop, there's musical ways to achieve that: find certain passages that you can repeat and puzzle them together, that'll keep the tempo of the music. If you can't or don't want to do that, you can stretch the loop to any desired length:
- Set your LED window to show seconds instead of musical measures.
- Double-click the jingle to open the Editor window.
- Check the "follow tempo and pitch" box, the program will go through some analyzing.
- Change the LED window do display the project parameters and play with the tempo slider. You will see that the region will get longer or shorter on the time axis (or the time axis contracts and extends), and you can set it so the piece fits the length of your video. (It's not continuous since the tempo goes in increments.)
However, in your case the music would become 25% slower. That might sound okay, but could also totally damage the feel of the song. -
How do you make the program repeat itself?
How would I make it so that when the if statement at the end of the code the program starts over from the begining?
Any help appreciated. Here is the code if you wanna see it.
import java.io.BufferedReader;
import java.io.InputStreamReader;
class SuperTester{
public static void main ( String[] args ){
// Create array that will hold deck
Deck[] decko = new Deck[52];
// Fill the array with a deck
decko = Deck.makeDeck();
// Print new deck
System.out.println( "PRINT NEW DECK" );
System.out.println( "" );
Deck.printDeck( decko );
// Shuffle the deck ( simulated riffle shuffling )!
decko = Deck.shuffleDeck( decko );
// Print the shuffled deck
System.out.println( "" );
System.out.println( "PRINT SHUFFLED DECK" );
System.out.println( "" );
Deck.printDeck( decko );
// Print first 5
System.out.println( "" );
System.out.println( "PRINT TOP 5" );
System.out.println( "" );
Deck.printFirstFive( decko );
// Print single card
System.out.println( "" );
System.out.println( "PRINT SINGLE CARD" );
System.out.println( "" );
Deck.printCard ( decko [2] );
System.out.println( "" );
BufferedReader in = new BufferedReader( new InputStreamReader (System.in));
int input;
System.out.println( " Do you want to re-run program? " );
System.out.println( " Push 1 for yes " );
System.out.println( " Push 2 for no " );
System.out.println( "" );
try
input = Integer.parseInt( in.readLine() );
catch( Exception e ){
if ( input == 1 ){
//WHAT DO I PUT HERE TO MAKE THE PROGRAM REPEAT ITSELF?
} // end method
} // end classSo i should just do something like?
int x = 0;
while (x == 0){
//code
if (inpu == 1) {
x == 0;
}else{ x == 1; } -
How can I make a menu that loops until it gets a user input?
Can someone please show me how to make a menu that loops with if statements until a valid choice is made by the user?
I have a menu similar to the following, but it doesn't loop and when you choose an item it doesn't seem to execute the If statements correctly.
String input;
Scanner in = new Scanner(System.in);
System.out.println("Make a menu choice");
System.out.println("1) Browse");
System.out.println("2) Buy");
System.out.println("3) Sell");
input = in.nextLine();
in.close();
*if (input == "1") {*
Application choice = new Application();
choice.browse();
Note: It doesn't seem to display the output of browse although it looks like it is executing it, why is this? Also, if input = 1 it still executes the else statements too why is this? -
How do you make the program start?
I have installed PSE 11 twice, now; the second time after an uninstallation of the first installation. Both times, the program started immediately FROM the installation. After exiting from the program, I have not been able to restart the program. I click on it; I double click on it (which should start 2 copies of the program!); I right click and click Open; I right click and click "open as administrator". Absolutely NOTHING happens. Is there some sort of glitch that means you have to leave the program open permanently? Please, how do I open the program?
Thank you.
Cherie BrumfieldThanks so much for responding. As it happens, I had already tried that
approach, with no results. I also spent some time last evening with a tech
on the Adobe Chat page, also with no results. So I just reloaded my PSE 8
program, which does still work! And this morning I get a notice of an
Adobe update to PSE 11 and, guess what?!--NOW PSE 11 works just fine!! Go
figure!
All of which has nothing to do with you having responded to my plea for
help. I really appreciate someone responding; it's nice to know that
people "out there" really do care. Thank you.
Cherie
On Wed, Feb 6, 2013 at 4:55 AM, bridge_mastero -
How Can I Make a High Quality HD DVD Video (dvd vob)
i work a hd project and after we will make a dvd video. if i export a mov and convert it with toast titanium the quality is bad. if i make it dvd studio pro hd dvd mac and pc is open but dvd player does not play it. and the other version dvd studio pro convert from 16/9 to 4/3. but i don't like it. the other one i send to compressor and chose the dvd/hd dvd:mpeg-2 30 minutes it exports mv2 not vob(audio ts video ts)
so i want to make a high quality hd dvd video how can i do that?
thanks
Message was edited by: rec_off
Message was edited by: rec_offI don't know about NTSC but there is a nice PAL solution for SD 16:9 for ordinary DVDs. The 16:9 image becomes 720x576 pixels. So the pixels are each quite wide, and the horizontal resolution is less than the vertical resolution, but at least no pixels are wasted as with letterbox.
A semi-solution is to make a HD-DVD. That format has been abandoned but Apple software pretends otherwise. Apple Compressor does compressions at around 20 Megabits/second data rate specifically for HD-DVD, and Apple DVD Studio Pro makes HD-DVDs. For short projects, less than around 30 minutes, the HD-DVD can be made on a normal DVD. (I did this for a 40 minute project by cutting the bitrate somewhat.) The quality is almost equal to Blu-Ray, but who can play it? People with well equipped Apples can. -
How do i make a dvd from my iphone videos
Would love to make a dvd of my iphone videos. Have tried Roxio but my videos are rotated during transfer and can't rotate them back. I tried windows dvd maker and says it doesn't support the file type of my videos. Any ideas?
If you have a Mac, you can use iDVD or iPhoto.
If you have a PC, you can try Windows DVD maker.
Windows DVD Maker is included in premium editions (Home Premium and Ultimate) of Windows Vista, and Windows 7
More information about Windows DVD maker, you found here http://windows.microsoft.com/en-US/windows7/Burn-a-DVD-Video-disc-with-Windows-D VD-Maker -
How can i grabb some image using an usb video grabber in Labview 7?
How can i make a list with all video and audio devices?
How to use DirectShow functions in Labview 7?Hi,
I can help you out with the audio part of your question: the Windows API has a set of functions called waveOutGetNumDevs and waveInGetNumDevs that give you the number of available devices for input or output. Then you can use waveInGetDevCaps and waveOutGetDevCaps to get more information on each device; with some work you could get the manufacturer and formats supported.
I have very limited knowledge on DirectShow; however it is based on COM so you shold be able to access it with LabVIEW's ActiveX capabilities.
I hope this helps.
Regards,
Juan Carlos
N.I.
Maybe you are looking for
-
Short dump while executing Market Planner
Hi, Working on CRM4.0 sp6 . While executing Market Planner(CRM_MKTPL) getting dump.... Syntax error in program "CL_CRM_MKTPL_APPL_BASE==============CP". Can enyone help out. Thanks, Anirban
-
How do I install Lion on my new iMac from a recovery thumb drive?
Anyone know how to install Lion from a recovery copy? It's made from the copy on my MacBook Pro on a thumb drive.
-
Is there a way to actually sync music from my iPhone 3G to my computer?
Recently, I had to get a new laptop. The music on my iPhone won't trasfer to my new laptop. I have put new, different music on my laptop. When I try to sync the two, laptop & iPhone, all it wants to do is to wipe out the music on my iPhone and repl
-
Autoscale XY Graph with 2 plots
I have a graph with 2 different plots on the same Y axis. If I turn off the "visible" property on one of these plots (so I have only one plot visible), the autoscale Y continue to take both plots into account, thus creating a very too large scale for
-
Which Java update for 10.8.4 OS X?
I downloaded the Java 7 and cannot get on my company CTC connection to access my files. I deleted Java 7, should I download Java 6 and is it safe?