How to Program 6020E in VC++

Hi,
I've a 6020E connected to my laptop working on Windows XP Pro. I also have the software that came with it installed on my machine.
I do not have either Measurement Studio or Labview on my system.
Please let me know the methodology to program and access this device in my VC++ application. Also, name of libraries, dlls or OCXs will be useful.
Thanks

Teddybare,
Since the DAQPad-6020E is not supported by NI-DAQmx, you will need to use Traditional NI-DAQ to program this device. Numerous Traditional NI-DAQ examples for use in VC++ are available in the following location:
C:\Program Files\National Instruments\NI-DAQ\Examples\VisualC
Additionally, the following KnowledgeBase explains how to use these examples in VC++:
KnowledgeBase: How to Compile and Run NI-DAQ Examples with Microsoft Visual C++
Finally, the Traditional NI-DAQ Function Reference Help provides documentation for all of the Traditional NI-DAQ functions. This resource is available in the following location:
>Start >> Programs >> National Instruments >> NI-DAQ
Good luck with your application.
Spencer S.

Similar Messages

  • How to program a midi foot controller on Mainstage? Does anyone knows how to program the foot controller with exclusive solo channel in order not to dance "tip tap" while from clean guitar I go to crunch or solo? How to do this programming on Mainstage?

    How to program a midi foot controller on Mainstage? Does anyone knows how to program the foot controller with exclusive solo channel in order not to dance "tip tap" while from clean guitar I go to crunch or solo? How to do this programming on Mainstage?
    I basically managed to learn how to invert parameters which allows me to be as default in the clean guitar channel and if I switch the first button on the midi foot controller I switch to crunch, but at this point I tryied so hard to programm the second and third button to switch, only through a button in one step, to a third channel for distorsion or a 4th channel for solo guitar but I couldn't figured out how this work can be done!
    I would appreciate if anyone could help or share this experience with others who are experiencing the same problem.
    Cheers.
    F.

    I cannot seem to get mainstage to recognize my FCB either. I am using IFCB. Anyone figure this out?
    Thanks,
    Eric

  • How to program mails to be sent in future date

    hi
    i would like to knwo how to program my mails to be sent in a future date.
    in the mail application and Outlook for Mac.
    (outlook for windows allows me to program de date a mail may be sent)
    best regards    

    You can use the Automator app to set an alarm on your calendar which sends the mail at a future time.
    It's simpler than it might sound.  This explains how:
    http://joannalaforet.wordpress.com/2010/02/08/schedule-mail-on-mac-the-easier-wa y-automator-ical-alarm/

  • I want to send 10 bit ADC from PIC via serial communicaton. i send it separetly 8 bit first then the other 2 bit. how to program in labview to capture those two packet then combine it togother

    i want to send 10 bit ADC from PIC mCu via serial communicaton.
     i send it separetly 8 bit first then the other 2 bit (2 bit --> with zero at 6 bit from LSB).
    how to program in labview to capture those two packet and then combine it together
    so i have 10 bit in lab view
    thank you

    Close, but now quite. You need to specify to the VISA Read how many bytes to read, not how many bits. Thus, the input would be 2, not 16. It's also not clear why you're trying to use the "String to Byte Array". The Type Cast will give you a number based on what data type you wired. You're basically telling it how to interpret the string. In this case we're telling it to interpret the string a 16-bit value, so we'll get a 16-bit integer. I know you said you wanted a 10-bit, but you can't have that. You'll get a 16-bit with 6 bits set to zero. Note: I did not completely understand what you said so we may need to change this slightly, but we want to get the communication and reading collection working first.
    Also, since you seem to be setting this in a loop you probably want to monitor this or to collect the data. For that you need a shift register. See attached for a modified version of your attempt. You need to set the datatype to I16 or U16 based on whether the value you get from the PIC is signed or unsigned.
    Message Edited by smercurio_fc on 05-01-2007 02:28 PM
    Attachments:
    Read PIC.vi ‏21 KB
    Read PIC.png ‏7 KB

  • I don't know how to program my DVR to edit out the commercial​s

    Does anyone know how to program the DVR not to record the commercials?  Its not a problem on public television, of course.

    Actually often very easy to do, but we will not see it again.  The Industry has fought against it and made all the manufacturers remove such features.

  • Modify the TicTacToeServer /client from deitel How to program

    We've been given example code from the deitel & deitel book how to program and have to carry out the following alterations:
    a) Modify the TicTacToeServer class to test for a win, loss or draw on each move in the game. Send a message to each client applet that indicates the result of the game when the game is over.
    b) Modify the TicTacToeClient class to display a button that when clicked allows the client to play another game. The button should be enabled only when a game completes. Note that both class TicTacToeClient and class TicTacToeServer must be modified to reset the board and all state information. Also, the other TicTacToeClient should be notified that a new game is about to begin so its board and state can be reset.
    c) Modify the TicTacToeClient class to provide a button that allows a client to terminate the program at any time. When the user clicks the button, the server and the other client should be notified. The server should then wait for a connection from another client so a new game can begin.
    d) Modify the TicTacToeClient class and the TicTacToeServer class so the winner of a game can choose game piece X or O for the next game. Remember: X always goes first.
    So far I have only been able to do part a) of the exercise im having a lot of difficulty with part b) which allows the client to play a new game.The code ive done so far is listed below if anyone can help i would be forever greatful. Thanks
    // Fig. 18.9: TicTacToeClient.java
    // Client that let a user play Tic-Tac-Toe with another across a network.
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import java.io.*;
    import javax.swing.*;
    public class TicTacToeClient extends JApplet implements Runnable, ActionListener {
    private JButton Button;
    private JTextField idField;
    private JTextArea displayArea;
    private JPanel boardPanel, panel2;
    private Square board[][], currentSquare;
    private Socket connection;
    private DataInputStream input;
    private DataOutputStream output;
    private char myMark;
    private boolean myTurn;
    private final char X_MARK = 'X', O_MARK = 'O';
    boolean done=false;
    Container container;
    // Set up user-interface and board
    public void init()
    container = getContentPane();
    // set up JTextArea to display messages to user
    displayArea = new JTextArea( 4, 30 );
    displayArea.setEditable( false );
    container.add( new JScrollPane( displayArea ), BorderLayout.SOUTH );
    // set up panel for squares in board
    boardPanel = new JPanel();
    boardPanel.setLayout( new GridLayout( 3, 3, 0, 0 ) );
    // create board
    board = new Square[ 3 ][ 3 ];
    // When creating a Square, the location argument to the constructor
    // is a value from 0 to 8 indicating the position of the Square on
    // the board. Values 0, 1, and 2 are the first row, values 3, 4,
    // and 5 are the second row. Values 6, 7, and 8 are the third row.
    for ( int row = 0; row < board.length; row++ ) {
    for ( int column = 0; column < board[ row ].length; column++ ) {
    // create Square
    board[ row ][ column ] = new Square( ' ', row * 3 + column );
    boardPanel.add( board[ row ][ column ] );
    // textfield to display player's mark
    idField = new JTextField();
    idField.setEditable( false );
    container.add( idField, BorderLayout.NORTH );
    Button = new JButton("New Game");
    container.add(Button, BorderLayout.BEFORE_FIRST_LINE);
    // set up panel to contain boardPanel (for layout purposes)
    panel2 = new JPanel();
    panel2.add( boardPanel, BorderLayout.CENTER );
    container.add( panel2, BorderLayout.CENTER );
    } // end method init
    // Make connection to server and get associated streams.
    // Start separate thread to allow this applet to
    // continually update its output in textarea display.
    public void start()
    // connect to server, get streams and start outputThread
    try {
    // make connection
    connection = new Socket( getCodeBase().getHost(), 12345 );
    // get streams
    input = new DataInputStream( connection.getInputStream() );
    output = new DataOutputStream( connection.getOutputStream() );
    // catch problems setting up connection and streams
    catch ( IOException ioException ) {
    ioException.printStackTrace();
    // create and start output thread
    Thread outputThread = new Thread( this );
    outputThread.start();
    } // end method start
    // control thread that allows continuous update of displayArea
    public void run()
    // get player's mark (X or O)
    try {
    myMark = input.readChar();
    // display player ID in event-dispatch thread
    SwingUtilities.invokeLater(
    new Runnable() {
    public void run()
    idField.setText( "You are player \"" + myMark + "\"" );
    myTurn = ( myMark == X_MARK ? true : false );
    // receive messages sent to client and output them
    while ( !done) {
    processMessage( input.readUTF() );
    } // end try
    // process problems communicating with server
    catch ( IOException ioException ) {
    ioException.printStackTrace();
    } // end method run
    // process messages received by client
    private void processMessage( String message )
    // valid move occurred
    if ( message.equals( "Valid move." ) ) {
    displayMessage( "Valid move, please wait.\n" );
    setMark( currentSquare, myMark );
    // invalid move occurred
    else if ( message.equals( "Invalid move, try again" ) ) {
    displayMessage( message + "\n" );
    myTurn = true;
    // opponent moved
    else if ( message.equals( "Opponent moved" ) ) {
    // get move location and update board
    try {
    int location = input.readInt();
    int row = location / 3;
    int column = location % 3;
    setMark( board[ row ][ column ],
    ( myMark == X_MARK ? O_MARK : X_MARK ) );
    displayMessage( "Opponent moved. Your turn.\n" );
    myTurn = true;
    } // end try
    // process problems communicating with server
    catch ( IOException ioException ) {
    ioException.printStackTrace();
    } // end else if
    else if ( message.equals("Game Over") ){
    displayMessage("fuck sake" );
    // simply display message
    else
    displayMessage( message + "\n" );
    } // end method processMessage
    // utility method called from other threads to manipulate
    // outputArea in the event-dispatch thread
    private void displayMessage( final String messageToDisplay )
    // display message from event-dispatch thread of execution
    SwingUtilities.invokeLater(
    new Runnable() {  // inner class to ensure GUI updates properly
    public void run() // updates displayArea
    displayArea.append( messageToDisplay );
    displayArea.setCaretPosition(
    displayArea.getText().length() );
    } // end inner class
    ); // end call to SwingUtilities.invokeLater
    // utility method to set mark on board in event-dispatch thread
    private void setMark( final Square squareToMark, final char mark )
    SwingUtilities.invokeLater(
    new Runnable() {
    public void run()
    squareToMark.setMark( mark );
    // send message to server indicating clicked square
    public void sendClickedSquare( int location )
    if ( myTurn ) {
    // send location to server
    try {
    output.writeInt( location );
    myTurn = false;
    // process problems communicating with server
    catch ( IOException ioException ) {
    ioException.printStackTrace();
    // set current Square
    public void setCurrentSquare( Square square )
    currentSquare = square;
    public void actionPerformed(ActionEvent e) {
    // I need code here
    // private inner class for the squares on the board
    private class Square extends JPanel {
    private char mark;
    private int location;
    public Square( char squareMark, int squareLocation )
    mark = squareMark;
    location = squareLocation;
    addMouseListener(
    new MouseAdapter() {
    public void mouseReleased( MouseEvent e )
    setCurrentSquare( Square.this );
    sendClickedSquare( getSquareLocation() );
    } // end Square constructor
    // return preferred size of Square
    public Dimension getPreferredSize()
    return new Dimension( 30, 30 );
    // return minimum size of Square
    public Dimension getMinimumSize()
    return getPreferredSize();
    // set mark for Square
    public void setMark( char newMark )
    mark = newMark;
    repaint();
    // return Square location
    public int getSquareLocation()
    return location;
    // draw Square
    public void paintComponent( Graphics g )
    super.paintComponent( g );
    g.drawRect( 0, 0, 29, 29 );
    g.drawString( String.valueOf( mark ), 11, 20 );
    } // end inner-class Square
    } // end class TicTacToeClient
    // Fig. 18.8: TicTacToeServer.java
    // This class maintains a game of Tic-Tac-Toe for two client applets.
    import java.awt.*;
    import java.net.*;
    import java.io.*;
    import javax.swing.*;
    public class TicTacToeServer extends JFrame {
    private char[] board;
    private JTextArea outputArea;
    private Player[] players;
    private ServerSocket server;
    private int currentPlayer;
    private final int PLAYER_X = 0, PLAYER_O = 1;
    private final char X_MARK = 'X', O_MARK = 'O';
    int moves=0;
    // set up tic-tac-toe server and GUI that displays messages
    public TicTacToeServer()
    super( "Tic-Tac-Toe Server" );
    board = new char[ 9 ];
    for (int i = 0; i<9; i++){
    board[i] = ' ';
    players = new Player[ 2 ];
    currentPlayer = PLAYER_X;
    // set up ServerSocket
    try {
    server = new ServerSocket( 12345, 2 );
    // process problems creating ServerSocket
    catch( IOException ioException ) {
    ioException.printStackTrace();
    System.exit( 1 );
    // set up JTextArea to display messages during execution
    outputArea = new JTextArea();
    getContentPane().add( outputArea, BorderLayout.CENTER );
    outputArea.setText( "Server awaiting connections\n" );
    setSize( 300, 300 );
    setVisible( true );
    } // end TicTacToeServer constructor
    // wait for two connections so game can be played
    public void execute()
    // wait for each client to connect
    for ( int i = 0; i < players.length; i++ ) {
    // wait for connection, create Player, start thread
    try {
    players[ i ] = new Player( server.accept(), i );
    players[ i ].start();
    // process problems receiving connection from client
    catch( IOException ioException ) {
    ioException.printStackTrace();
    System.exit( 1 );
    // Player X is suspended until Player O connects.
    // Resume player X now.
    synchronized ( players[ PLAYER_X ] ) {
    players[ PLAYER_X ].setSuspended( false );
    players[ PLAYER_X ].notify();
    } // end method execute
    // utility method called from other threads to manipulate
    // outputArea in the event-dispatch thread
    private void displayMessage( final String messageToDisplay )
    // display message from event-dispatch thread of execution
    SwingUtilities.invokeLater(
    new Runnable() {  // inner class to ensure GUI updates properly
    public void run() // updates outputArea
    outputArea.append( messageToDisplay );
    outputArea.setCaretPosition(
    outputArea.getText().length() );
    } // end inner class
    ); // end call to SwingUtilities.invokeLater
    // Determine if a move is valid. This method is synchronized because
    // only one move can be made at a time.
    public synchronized boolean validateAndMove( int location, int player )
    boolean moveDone = false;
    // while not current player, must wait for turn
    while ( player != currentPlayer ) {
    // wait for turn
    try {
    wait();
    // catch wait interruptions
    catch( InterruptedException interruptedException ) {
    interruptedException.printStackTrace();
    // if location not occupied, make move
    if ( !isOccupied( location ) ) {
    // set move in board array
    board[ location ] = currentPlayer == PLAYER_X ? X_MARK : O_MARK;
    // change current player
    currentPlayer = ( currentPlayer + 1 ) % 2;
    // let new current player know that move occurred
    players[ currentPlayer ].otherPlayerMoved( location );
    notify(); // tell waiting player to continue
    // tell player that made move that the move was valid
    return true;
    // tell player that made move that the move was not valid
    else
    return false;
    } // end method validateAndMove
    // determine whether location is occupied
    public boolean isOccupied( int location )
    if ( board[ location ] == X_MARK || board [ location ] == O_MARK )
    return true;
    else
    return false;
    void gameOverCheck() {
    boolean over = false;
    // Check rows
    for (int start=0; start < 9; start += 3)
    over = over || ((board[start] != ' ') &&
    (board[start] == board[start+1]) &&
    (board[start] == board[start+2]));
    // Check columns
    for (int start=0; start < 3; start++)
    over = over || ((board[start] != ' ') &&
    (board[start] == board[start+3]) &&
    (board[start] == board[start+6]));
    // Check diagonals
    over = over || ((board[0] != ' ') &&
    (board[0] == board[4]) && (board[0] == board[8]));
    over = over || ((board[2] != ' ') &&
    (board[2] == board[4]) && (board[2] == board[6]));
    if (over || (moves>=9))
    for ( int i = 0; i < players.length; i++ )
    players.gameOver(over ? (currentPlayer+1)%2 : -1 );
    public static void main( String args[] )
    TicTacToeServer application = new TicTacToeServer();
    application.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    application.execute();
    // private inner class Player manages each Player as a thread
    private class Player extends Thread {
    private Socket connection;
    private DataInputStream input;
    private DataOutputStream output;
    private int playerNumber;
    private char mark;
    protected boolean suspended = true;
    boolean done = false;
    // set up Player thread
    public Player( Socket socket, int number )
    playerNumber = number;
    // specify player's mark
    mark = ( playerNumber == PLAYER_X ? X_MARK : O_MARK );
    connection = socket;
    // obtain streams from Socket
    try {
    input = new DataInputStream( connection.getInputStream() );
    output = new DataOutputStream( connection.getOutputStream() );
    // process problems getting streams
    catch( IOException ioException ) {
    ioException.printStackTrace();
    System.exit( 1 );
    } // end Player constructor
    // send message that other player moved
    public void otherPlayerMoved( int location )
    // send message indicating move
    try {
    output.writeUTF( "Opponent moved" );
    output.writeInt( location );
    // process problems sending message
    catch ( IOException ioException ) {
    ioException.printStackTrace();
    void gameOver(int winner) {
    try {
    output.writeUTF( "Game Over. " +
    (( winner == -1 ) ? "No winner." :
    ( "Winner is " + ( winner == 0 ? 'X' : 'O' ) + "." ) ) );
    done=true;
    output.writeUTF("Game Over");
    } catch( IOException e ) {
    e.printStackTrace(); System.exit( 1 );
    public void run()
    // send client message indicating its mark (X or O),
    // process messages from client
    try {
    displayMessage( "Player " + ( playerNumber ==
    PLAYER_X ? X_MARK : O_MARK ) + " connected\n" );
    output.writeChar( mark ); // send player's mark
    // send message indicating connection
    output.writeUTF( "Player " + ( playerNumber == PLAYER_X ?
    "X connected\n" : "O connected, please wait\n" ) );
    // if player X, wait for another player to arrive
    if ( mark == X_MARK ) {
    output.writeUTF( "Waiting for another player" );
    // wait for player O
    try {
    synchronized( this ) {
    while ( suspended )
    wait();
    // process interruptions while waiting
    catch ( InterruptedException exception ) {
    exception.printStackTrace();
    // send message that other player connected and
    // player X can make a move
    output.writeUTF( "Other player connected. Your move." );
    while ( ! done ) {
    // get move location from client
    int location = input.readInt();
    // check for valid move
    if ( validateAndMove( location, playerNumber ) ) {
    displayMessage( "\nlocation: " + location );
    output.writeUTF( "Valid move." );
    gameOverCheck();
    else
    output.writeUTF( "Invalid move, try again" );
    // close connection to client
    } // end try
    // process problems communicating with client
    catch( IOException ioException ) {
    ioException.printStackTrace();
    System.exit( 1 );
    // end method run
    // set whether or not thread is suspended
    public void setSuspended( boolean status )
    suspended = status;
    } // end class Player
    } // end class TicTacToeServer

    reply #1:
    http://forum.java.sun.com/thread.jspa?threadID=5114663
    &tstart=0@Op. Don't multi/cross-post

  • Subtle bug in Deitel & Deitel "Java How to Program" book

    Merry x mas and happy new year, guys.
    I have this applet (which is at the same time runnable and listener) its printed in Deitel & Deitel "Java How to Program" book 3rd ed.
    The program works but as you turn on and off the "suspend" checkboxes some of the threads are not notified, so they go to infinite wait state, deadlock. I couldn't figure out what is wrong or how to fix the problem.. please read the code below, or copy and paste this code to your eclipse, its just one file, then play with the check boxes, some of the threads don't wake up after wait... technically they don't shift from WAITING to TIMED_WAITING state.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    * @author
    // Fig. 15.7: RandomCharacters.java
    // Demonstrating the Runnableinterface
    public class RandomCharacters extends JApplet implements Runnable, ActionListener {
        private String alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        private JLabel outputs[];
        private JCheckBox checkboxes[];
        private final static int SIZE = 3;
        private Thread threads[];
        private boolean suspended[];
        public void init() {
            outputs = new JLabel[SIZE];
            checkboxes = new JCheckBox[SIZE];
            threads = new Thread[SIZE];
            suspended = new boolean[SIZE];
            Container c = getContentPane();
            c.setLayout(new GridLayout(SIZE, 2, 5, 5));
            for (int i = 0; i < SIZE; i++) {
                outputs[i] = new JLabel();
                outputs.setBackground(Color.green);
    outputs[i].setOpaque(true);
    c.add(outputs[i]);
    checkboxes[i] = new JCheckBox("Suspended");
    checkboxes[i].addActionListener(this);
    c.add(checkboxes[i]);
    public void start() {
    // create threads and start every time start is called
    for (int i = 0; i < threads.length; i++) {
    threads[i] = new Thread(this, "Thread " + (i + 1));
    threads[i].start();
    public void run() {
    Thread currentThread = Thread.currentThread();
    int index = getIndex(currentThread);
    char displayChar;
    while (threads[index] == currentThread) {
    // sleep from 0 to 1 second
    try {
    Thread.sleep((int) (Math.random() * 1000));
    synchronized (this) {
    while (suspended[index]
    && threads[index] == currentThread) {
    wait();
    } catch (InterruptedException e) {
    System.err.println("sleep interrupted");
    displayChar = alphabet.charAt(
    (int) (Math.random() * 26));
    outputs[index].setText(currentThread.getName() + ": " + displayChar);
    System.err.println(currentThread.getName() + " terminating");
    private int getIndex(Thread current) {
    for (int i = 0; i < threads.length; i++) {
    if (current == threads[i]) {
    return i;
    return -1;
    public synchronized void stop() {
    // stop threads every time stop is called
    // as the user browses another Web page
    for (int i = 0; i < threads.length; i++) {
    threads[i] = null;
    notifyAll();
    public synchronized void actionPerformed(ActionEvent e) {
    for (int i = 0; i < checkboxes.length; i++) {
    if (e.getSource() == checkboxes[i]) {
    suspended[i] = !suspended[i];
    outputs[i].setBackground(
    !suspended[i] ? Color.green : Color.red);
    if (!suspended[i]) {
    notify();
    return;
    Thanks in advance.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Abiel wrote:
    No, notifyAll() is used to tell the threads that we're stopping.... see that it's written in the stop() method of the applet. Eg if the user browses away from our applet we set the array of threads to null and notify them all. So notifyAll() makes sense.Yes, it does make sense there too (!!!!!!!).
    However, I gave it a try with what u suggested, and it didn't work (as expected) .... Apparently you did not really read my suggestion or my explanation. If you had, you'd have expected it to work and it would have worked.
    the problems still remains, some threads are getting in wait state even if their check box is not suspended.Maybe you should add the following code to understand the root cause and solution.
        System.out.println("Thread " + index + " will wait to be notified.");
        wait();
        System.out.println("Thread " + index + " was notified.");
    what could the problem be?Improper use of notify()
    With kind regards
    Ben

  • How to program the simple tcp/ip connection?

    I would like to know how to program in labview the simple tcp/ip connetion.
    And is there some site with examples.

    Luciano Kan Horiuchi wrote:
    > I would like to know how to program in labview the simple tcp/ip connetion.
    > And is there some site with examples.
    You should probably start with the examples that ship with LabVIEW. For a good
    server-to-single-client example, check out Data Client.vi and Data Server.vi
    from the shipping examples, and for a good server-to-multiple-client example,
    try the Date Client.vi/Date Server.vi pair instead. All of these can be found
    in the following VI library:
    \examples\comm\tcpex.llb
    or via the Search Examples interface in LabVIEW. There are certainly
    additional examples on the NI site, but there's no better place to start than
    with these.
    Regards,
    John Lum

  • How to program my own UPI and OPI?

    Hi,
    I just want to know how to program my own UPI and OPI. I want to
    add some features into the DBMS. Is there some one can answer my
    questions, or tell me where to find information? Thanks!
    null

    Follow the bouncing example
    package mil.army.logsa.sandbox.thread;
    import java.util.Observable;
    import java.util.Observer;
    public class RunnableExample implements Observer {
         public static void main(String[] args){
              RunnableExample e = new RunnableExample() ;
              e.exec() ;
         // This is here because you can't reference (this) in the static context of the main method
         private void exec(){
              System.out.println("Launching RunnableExample") ;
              System.out.println("Creating Thing") ;
              Thing t = new Thing(this) ;
              t.start() ;
              System.out.println("Shutting down RunnableExample") ;
         @Override
         public void update(Observable o, Object arg) {
              System.out.println(arg) ;
    class Thing extends Thread {
         private ObservableThing obsThing ;
         public Thing(Observer o){
              super() ;
              obsThing = new ObservableThing() ;
              obsThing.addObserver(o) ;
         public void run(){
              System.out.println("Starting Thing") ;
              for(int i=0; i<100; i++){
                   obsThing.notifyObservers(i + " is " + (i%2==0 ? "EVEN" : "ODD")) ;
              System.out.println("Thing is finished") ;
    class ObservableThing extends Observable{
         public void notifyObservers(Object o){
              setChanged() ;
              super.notifyObservers(o) ;
    }PS.

  • How can we find out how many programs are stored in a percticular package

    Hi,
    I need to find out how many programs are stored in aperticular package.
    For example we are having one package in our project. I need to give all saved programs details into this project. How can we find this.
    Thanks in advance.

    Hi,
    From TADIR table we can find out.
    Regards,
    Jyothi CH.

  • I know how to program in java(Should I learn c, c++?)

    I know how to program in java. I want to be able to communicate with the hardware on my pc. I also hear that C, C++ is a lower level than java. Lower level meaning it can communicate with the hardware. I know java is very portable could do interfacing and could do so many things with the java programming language. I find the java programmig language cool. Now when I read about the JNI(java native interface) I think I could communicate with methods from java to functions in c++. I want to learn c++ and use it with JNI.
    Posting this topic because I want to be sure about what I'm doing.
    Thanks
    George

    in fact, memory management is the main pitfall in C++ programming. The following may give you a few headaches:
    - destructors
    - header files which try to include eachother
    - "memory access violation"
    - templates (upcoming java includes generics, which is similar)
    - pointers
    If you can overcome the above problems, you'll find that c++ is much like Java, only a bit more low-level. Accessing hardware directly however is quite a challenge (espescially under Windows which doesn't allow direct access for as far as I know), but not impossible. I don't know exactly, but I think it involves developing a small driver layer.
    It's to bad you learnt Java before C++, the other way around would have been much easier.

  • How to program in java

    hey guys. i am an undergraduate student. graduating next spring 2007. i did all my programming languages which were required in my course in 2004 and since that i have not taken any programming classes. i got my internship as a database administrator so got into MSaccess and Sql and VbA scripting. since my graduation year is near i want to be strong in database and programming and i was just reading about the employers what kind of programming they prefer and most of the times out of 100 you can say 80% needs java. so i have realized if i have my skills good in java and database job wont be any problem. i would like you to tell me about books i can buy from amazon.com or resources on internet from which i can understand the concept of programming again and then once my concept is clear about all the data types and functions i can start learning java. i would like you to tell me good java books also and some advance. the only book i have is the second edition of Java how to program. Thanks alot for all your help.

    The perverbial List:
    Free Tutorials and Such
    Installation Notes - JDK 5.0 Microsoft Windows (32-bit)
    Your First Cup of Java
    The Java� Tutorial - A practical guide for programmers
    New to Java Center
    Java Programming Notes - Fred Swartz
    How To Think Like A Computer Scientist
    Introduction to Computer science using Java
    The Java Developers Almanac 1.4
    Object-Oriented Programming Concepts
    Object-oriented language basics
    Don't Fear the OOP
    Free Java Books
    Thinking in Java, by Bruce Eckel (Free online)
    Core Servlet Programming, by Merty Hall (Free Online)
    More Servlets, by Marty Hall (Free Online)
    A Java GUI Programmer's Primer
    Data Structures and Algorithms
    with Object-Oriented Design Patterns in Java, by Bruno R. Preiss
    Introduction to Programming Using Java, by David J. Eck
    Advanced Programming for the Java 2 Platform
    The Java Language Specification
    Books:
    Head First Java, by Bert Bates and Kathy Sierra
    Core Java, by Cay Horstmann and Gary Cornell
    Effective Java, by Joshua Bloch
    Enjoy
    JJ

  • How to program in Java to delete a ZipEntry in ZipFile

    As we all known we can delete a zipentry in zipfile easily using WinZip,but how to program in Java to delete a ZipEntry in ZipFile? I can not find API function in ZIP package.Please help me,thanks.

    I think there are no methods to delete a particual file from a zip file -
    maybe there are packagers for that but not in java.util.zip
    you can just write your own function uncompress - and create a new file again - you can look here to get some examples
    http://www.idevelopment.info/data/Programming/java/zip/

  • Deitel, Java How To Program exercise question

    Hi, :)
    I'm new to programming and I'm using the Java How To Program Fourth Edition from Deitel and Deitel as my text. I've run into a problem with Exercise 2.16 Where I'm asked:
    "Write an application that asks the user to enter two numbers, obtains the numbers from the user and prints the sum, product, difference, and quotient of the numbers."
    From that I have written this code:
    // Exercise 2.16
    /* An application that asks the user to enter two numbers, obtains the numbers from the use and prints the sum,
    product, difference and quotient of the numbers. Using the techniques shown in Fig 2.9 */
    //Java extension packages
    import javax.swing.JOptionPane;
    public class Exercise2_16{
         //Main method
         public static void main(String args[]){
         String firstNumber, secondNumber;                          //introduce variables
         int number1, number2, sum, product, difference, quotient;          //introduce variables
         firstNumber=JOptionPane.showInputDialog("Enter first integer:");     //Create input window
         secondNumber=JOptionPane.showInputDialog("Enter second integer:");     //Create input window
         number1=Integer.parseInt(firstNumber);                         //String to integer
         number2=Integer.parseInt(secondNumber);                         //String to integer
         //perform operations
         sum = number1+number2;
         product = number1*number2;
         difference = number1-number2;
         quotient = number1/number2;
         //Display results
         JOptionPane.showMessageDialog(null, "The sum is " + sum,
         "The product is " + product, "The difference is " + difference,
         "The quotient is " + quotient, "Results", JOptionPane.INFORMATION_MESSAGE);
         //End program
         System.exit(0);
         }//End main method
    }//end class Exercise2_16
    When I compile this code I get an error and I can't figure out why. Any help is really appreciated as I'm stumped and given the simplicity of the app I'm kinda bummed it has me stuck :(.

    I substituted your line and this is the error I'm receiving now:
    F:\jdk1.3\Learning Java>javac Exercise2_16.java
    Exercise2_16.java:32: unclosed string literal
    JOptionPane.showMessageDialog(null, "The sum is " + sum + ", The product is" + product + ",
    The difference is" + difference + ", The quotient is" + quotient + ", \"Results\", JOptionPane.INFORMATION_MESSAGE);
    ^
    Exercise2_16.java:35: ')' expected
    System.exit(0);
    ^
    2 errors
    It doesn't really matter to me if there are returns but maybe for readability there should be and so I learn how to as well.

  • How to program this in java? Please help

    How to program this in java?
    please explain steps, it has to come out like this:
    example
    input: 3b1w3b
    output:
    BBBWBBB

    import java.io.*;
    public class Test {
    static java.io.PrintStream o = java.lang.System.out;
    public static void main(String[] args)throws Exception {      
         BufferedReader BR = new BufferedReader(new InputStreamReader(System.in));
         System.out.print("Enter plot for printing: ");
         String s = BR.readLine();
         char[] cs = s.toLowerCase().toCharArray();
         for(int i=0, j=0; i < cs.length-0x1; i+=0x2, j=0)
              while(j++ < (int)(cs[i]-0x30))
                   o.print((char)(cs[i+0x1]-0x20));
    I tried changeing it to this so I can enter my own string, but I want to change it some more so that it can enter multiple input separated by space, so that it can form a sort of picture line by line. I tried using tolkenizer but I get errors. I dont know how to use tolkenizer properly can anyone please TEACH. you dont have to tell how or give me the code if you dont want to. yes I know Im a noob and I dont know java as good as everyone here, If everyone thinks I don't deserve help then DON'T help, I'm just trying to learn programming

Maybe you are looking for

  • Exchange 2010 SP1 and SP2 are no longer supported.

    Exchange 2010 SP3 is the minimal version that should be installed on your Exchange Servers and just may contain the fixes you need to solve your issue. Support for 2010 SP1 and SP2 has ended. Before posting a question, please ensure you are running a

  • Does Creative Cloud Work with Windows Vista?

    Someone please confirm either way, my Pc is dual core 64 bit so I know im alright there.

  • Windows 8.1

    Windows 8.1 is a mess.  It was released with so many issues it's not even funny.  I hope the upcoming update fixes some of these issues. The message boards are filled with people having problems connecting with other network pcs and printers. First t

  • Problem instaling fix for Microsoft teredo tunneling adapter

    In Devices and Printers, the desktop icon shows an exclamation point.  I ran troubleshooting and was informed that I need Microsoft teredo tunneling adapter.  I have no idea what that is.  The Troubleshooter tried to install it but was unsuccessful. 

  • CMP Custom Finder Method Problem

    Hi everybody, I have a problem about CMP Custom Finder Method. I made CMP Entity Bean and deployed. Then, I updated finder section in orion-ejb-jar.xml to add my custom finder query. Here is updating finder section in my orion-ejb-jar.xml. <finder-me