Trajectory

ee my program implementation @ the following:
http://home.comcast.net/~weldonchafinjr/wsb/html/view.cgi-home.html-.html
using TRAJECTORY PROGRAM link
or
http://home.comcast.net/wsb-cgi-bin/ssi.cgi?PWPTool=HTMLView&State=False&wsbID=257896&GroupID=228536&Owner=weldonchafinjr&SiteID=1297966
or
http://home.comcast.net/~weldonchafinjr/wsb/trajectory/Trajectory.html
The program set is not allowed to have inner classes and is comprised of five classes and the html file:
Trajectory.class :      Trajectory.java has 1135 LOC in castrated version
SimulationPanel.class:      SimulationPanel.java has 152 LOC
Are.class:     Are.java has 7 LOC
Tare.class      Tare.class has 7 LOC
Nve.class      Nve.class has 7 LOC
Trajectory.html      Trajectory.html has 11 LOC
Trajectory.class extends JApplet implements ActionListener
SimulationPanel.class extends JPanel used in Trajectory.class
Are.class., Tare.class, Nve.class each extends Exception class
Trajectory.html is a basic html file
Trajectory.class creates a GUI for user I/O, calculates data and creates a timer to set up an array of the data. SimulationPanel then uses array data to invoke paintComponent( Graphics g ) method and plot the data. Simulation Panel sets up a 2D real time simulation display.
The program set works fine via appletviewer Trajectory.html command.
However, invoking the html file directly causes a problem. When the Simulation Panel display is generated, I am unable to use its reset button to perform another 2D Simulation. The scale for the 2D Simulation is frozen and the applet seems to encounter deadlock. So I have added the information messages via showMessageDialog to warn users of this problem. I saw the Sunmicrosystems demo program "DitherTest.java" code and noticed how threads were controlled with a wipe operation via a "New Image" button and I wonder if my Simulation Panel reset button could be modified to do something similar. I do not presently have any elaborate overrides for thread control methods.
I desire assistance in correcting this problem. The castrated version essentially is the same as what is currently used at the website except some methods and variable values have been modified for security reasons but otherwise are not relevant to the problem. I suspect that not much code modification will be necessary and I don't think modifications to Are.java, Tare.java and Nve.java are required.
The solution could actually be relatively simple, but I don't have an IDE to troubleshoot. If the total LOC are not too much to post here, then let me know and I'll post. Otherwise, give me an Email address and I'll convey the code.

The following code set is the castrated version. Don't get frightened by the amount of code since the majority is commenting and methods dedicated to the calculation and GUI that are not a part of the problem. Who can help me?
Trajectory.java:
// Trajectory Analysis Program: Trajectory.java
//VERSION T1
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.text.*;
public class Trajectory extends JApplet implements ActionListener {
     final double MAX = 90.0;
     final double MIN = -90.0;
     final double MAX_ALTITUDE = 2000000.0;
     final double MIN_ALTITUDE = 0.0;
     final double R = 20925643.2;               // earth radius ft
     final double G_SL = 32.174;               // gravity accel: sea lvl (fps)ps
     final double DENSITY_SL = 0.002376899341;     // air dens: sea lvl slugs/cu ft
     final double TEMP_SL = 518.69;               // air temp: sea lvl Rank
     final double PRESS_SL = 2116.199414;          // air press: sea lvl psf
     final static int MAX_TIME = 6000;
     private JTextArea introductionArea, resultsArea;
     private JLabel spanLabel, chordLabel,
          thicknessLabel, massLabel, altitudeLabel, altitude_endLabel, velocityLabel,
          trajectory_angleLabel, time_incrementLabel, rotation_factorLabel,
          calculationLabel, resultsLabel;
     private JTextField spanField, chordField, thicknessField,
          massField, altitudeField, altitude_endField, velocityField,
          trajectory_angleField, time_incrementField, rotation_factorField;
     private JButton startButton, resetButton;
     public JButton two_d_sButton, calcButton, simstartButton, simresetButton;
     double max_alt, max_dis;
     String introduction_string, span_string, chord_string, thickness_string,
          mass_string, altitude_string, altitude_end_string, velocity_string,
          trajectory_angle_string, time_increment_string, rotation_factor_string,
          results_string;
     public String data_area_string;
     public JTextArea data_area;
     public double span, chord, thickness, mass, altitude, altitude_end, velocity,
          trajectory_angle, time_increment, rotation_factor, distance, velocity_fps,
          elapsed_time, temp_Rank, viscosity, density, orbit_dbl, new_distance,
          c_miles, d_min, sec, Joules, Tons_of_TNT, Pounds_of_TNT,
          KiloTons_of_TNT, Hiroshima_Bomb, angleB;
     public boolean value, sentinel, status_2, loop;
     public int orbit, min;
     public static int time_counter, m, n;
     public static double Results_Array[][] = new double[MAX_TIME][6];
     public static boolean scale_type = true;
     public static boolean animate = false;
     public static int max_screen_altitude_scale, max_screen_distance_scale;
     private CardLayout layout = new CardLayout();
     SimulationPanel mSimPanel;
     public static int resultsRIndex = 0;
     public static boolean erase = true;
     public int time_count = 0;
     public int RIndex = 0;
     Timer mAnimationTimer;
     int mCurrentPoint;
      * This main() method allows the applet to be run as a command line application.
      * Please leave it in for future debugging.
      * Use the command line: java Trajectory
     public static void main(String[] args) {
          JFrame mainFrame = new JFrame("Trajectory Simulation");
          mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          Trajectory traj = new Trajectory();
          traj.init();
          mainFrame.getContentPane().add(traj, BorderLayout.CENTER);
          mainFrame.pack();
          traj.start();
          mainFrame.setVisible(true);
     // create objects
     public void init()
          span = 0;
          chord = 0;
          thickness = 0;
          mass = 0;
          altitude = 0;
          altitude_end = 0;
          velocity = 0;
          trajectory_angle = 0;
          time_increment = 0;
          rotation_factor = 0;
          distance = 0;
          velocity_fps = 0;
          elapsed_time = 0;
          temp_Rank = 0;               //     air temperature degrees R
          viscosity = 0;               //     air viscosity     
          density = 0;               //     air density
          value = true;
          sentinel = true;
          boolean status_2 = true;     //     short cut condition
          loop = true;
          orbit = 0;
          orbit_dbl = 0.0;
          new_distance = 0.0;
          c_miles = 0.0;
          d_min = 0.0;
          min = 0;
          sec = 0.0;
          Joules = 0.0;
          Tons_of_TNT= 0.0;
          Pounds_of_TNT= 0.0;           
          KiloTons_of_TNT= 0.0;
          Hiroshima_Bomb= 0.0;
          angleB = 0;
          max_dis = 0;
          max_screen_altitude_scale = 0;
          max_screen_distance_scale = 0;
          mCurrentPoint = 0;
          time_counter = 0;
          m = 0;
          n= 0;
          for( m = 0; m < MAX_TIME; m++ )
               for( n = 0; n < 6; n++ )
                    Results_Array[m][n] = 0;
          Introduction();
          span_string = "";
          chord_string = "";
          thickness_string = "";
          mass_string = "";
          altitude_string = "";
          altitude_end_string = "";
          velocity_string = "";
          trajectory_angle_string = "";           
          time_increment_string = "";
          rotation_factor_string = "";
          results_string = "";
          // create container & panel
          this.getContentPane().setLayout(this.layout);
                   JPanel panelA = new JPanel();
          two_d_sButton = new JButton("2D Simulation");
          // register two_d_sButton event handler
          two_d_sButton.addActionListener(this);
          this.getContentPane().add(panelA, "Calculation");
          panelA.setLayout(new BorderLayout());
          // set up vertical boxlayout
          Box box = Box.createVerticalBox();
          Box inputbox1 = Box.createHorizontalBox();
          Box inputbox2 = Box.createHorizontalBox();
          Box inputbox2a = Box.createHorizontalBox();
          Box inputbox2b = Box.createHorizontalBox();
          Box inputbox2c = Box.createHorizontalBox();
          Box inputbox2d = Box.createHorizontalBox();
          Box inputbox3 = Box.createHorizontalBox();
          Box buttonbox = Box.createHorizontalBox();
          // set up introduction
          introductionArea = new JTextArea( introduction_string, 21, 50 );
          introductionArea.setEditable( false );
          box.add( new JScrollPane( introductionArea ) );
          box.add( Box.createVerticalStrut (10) );
          box.add( inputbox1);
          box.add(inputbox2a);
          Dimension minSize = new Dimension(5, 15);
          Dimension prefSize = new Dimension(5, 15);
          Dimension maxSize = new Dimension(Short.MAX_VALUE, 15);
          inputbox2a.add(new Box.Filler(minSize, prefSize, maxSize));
          // set up span
          spanLabel = new JLabel( "span (feet)" );
          spanField = new JTextField(5 );
          inputbox2a.add( spanLabel );
          inputbox2a.add( spanField );
          inputbox2a.add(new Box.Filler(minSize, prefSize, maxSize));
          // set up chord
          chordLabel = new JLabel( "chord (feet)" );
          chordField = new JTextField(5 );
          inputbox2a.add( chordLabel );
          inputbox2a.add( chordField );
          inputbox2a.add(new Box.Filler(minSize, prefSize, maxSize));
          // set up thickness
          thicknessLabel = new JLabel( "thickness (feet)" );
          thicknessField = new JTextField(5 );
          inputbox2a.add( thicknessLabel );
          inputbox2a.add( thicknessField );
          inputbox2a.add(new Box.Filler(minSize, prefSize, maxSize));
          box.add( Box.createVerticalStrut (10) );
          box.add(inputbox2b);
          inputbox2b.add(new Box.Filler(minSize, prefSize, maxSize));
          // set up mass
          massLabel = new JLabel( "mass (slugs)" );
          massField = new JTextField(5);
          inputbox2b.add( massLabel );
          inputbox2b.add( massField );
          inputbox2b.add(new Box.Filler(minSize, prefSize, maxSize));
          // set up start altitude
          altitudeLabel = new JLabel( "start altitude (feet)");
          altitudeField = new JTextField(5 );
          inputbox2b.add( altitudeLabel );
          inputbox2b.add( altitudeField );
          inputbox2b.add(new Box.Filler(minSize, prefSize, maxSize));
          // set up end altitude
          altitude_endLabel = new JLabel( "end altitude (feet)");
          altitude_endField = new JTextField(5 );
          inputbox2b.add( altitude_endLabel );
          inputbox2b.add( altitude_endField );
          inputbox2b.add(new Box.Filler(minSize, prefSize, maxSize));
          box.add( Box.createVerticalStrut (10) );
          Dimension minSize2c = new Dimension(35, 15);
          Dimension prefSize2c = new Dimension(35, 15);
          Dimension maxSize2c = new Dimension(Short.MAX_VALUE, 15);
          box.add(inputbox2c);
          inputbox2c.add(new Box.Filler(minSize2c, prefSize2c, maxSize2c));
          // set up velocity
          velocityLabel = new JLabel( "velocity (Mach Number)");
          velocityField = new JTextField(5);
          inputbox2c.add( velocityLabel );
          inputbox2c.add( velocityField );
          inputbox2c.add(new Box.Filler(minSize2c, prefSize2c, maxSize2c));
          // set up trajectory_angle
          trajectory_angleLabel = new JLabel( "trajectory angle (degrees)");
          trajectory_angleField = new JTextField(5);
          inputbox2c.add( trajectory_angleLabel );
          inputbox2c.add( trajectory_angleField );
          inputbox2c.add(new Box.Filler(minSize2c, prefSize2c, maxSize2c));
          box.add( Box.createVerticalStrut (10) );
          Dimension minSize2d = new Dimension(50, 15);
          Dimension prefSize2d = new Dimension(50, 15);
          Dimension maxSize2d = new Dimension(Short.MAX_VALUE, 15);
          box.add(inputbox2d);
          inputbox2d.add(new Box.Filler(minSize2d, prefSize2d, maxSize2d));
          // set up time_increment
          time_incrementLabel = new JLabel( "time increment (seconds)" );
          time_incrementField = new JTextField(5);
          inputbox2d.add( time_incrementLabel );
          inputbox2d.add( time_incrementField );
          inputbox2d.add(new Box.Filler(minSize2d, prefSize2d, maxSize2d));
          // set up rotation_factor
          rotation_factorLabel = new JLabel( "rotation factor (number)" );
          rotation_factorField = new JTextField(5);
          inputbox2d.add( rotation_factorLabel );
          inputbox2d.add( rotation_factorField );
          inputbox2d.add(new Box.Filler(minSize2d, prefSize2d, maxSize2d));
          box.add( Box.createVerticalStrut (10) );
          Dimension minSizeB = new Dimension(10, 30);
          Dimension prefSizeB = new Dimension(10, 30);
          Dimension maxSizeB = new Dimension(Short.MAX_VALUE, 30);
          buttonbox.add(new Box.Filler(minSizeB, prefSizeB, maxSizeB));
          // set up start button
          startButton = new JButton( "START" );
          buttonbox.add( startButton );
          buttonbox.add(new Box.Filler(minSizeB, prefSizeB, maxSizeB));
          // set up reset button
          resetButton = new JButton( "RESET" );
          buttonbox.add( resetButton );
          buttonbox.add(new Box.Filler(minSizeB, prefSizeB, maxSizeB));
          // set up 2D Simulation button
          buttonbox.add(two_d_sButton);
          buttonbox.add(new Box.Filler(minSizeB, prefSizeB, maxSizeB));
          box.add( Box.createVerticalStrut (10) );
          box.add( buttonbox);
          // set up results
          resultsArea = new JTextArea( results_string, 9, 50 );
          resultsArea.setEditable( false );
          box.add( new JScrollPane( resultsArea ) );
          // add box to panelA
          panelA.add( box);
          // register event handlers
          spanField.addActionListener( this );
          chordField.addActionListener( this );          
          thicknessField.addActionListener( this );
          massField.addActionListener( this );
          altitudeField.addActionListener( this );
          altitude_endField.addActionListener( this );
          velocityField.addActionListener( this );          
          trajectory_angleField.addActionListener( this );
          time_incrementField.addActionListener( this );
          rotation_factorField.addActionListener( this );
          startButton.addActionListener( this );
          resetButton.addActionListener( this );
          reset();
     } // end method init     
     public void t_r_a_test (double trajectory_angle) throws Tare {   
          if (trajectory_angle > MAX || trajectory_angle < MIN)
                      throw new Tare("\ntrajectory_angle "
               + trajectory_angle + " is outside of allowable range\n" 
               + "( " + MIN + " <= trajectory angle <= " + MAX + " )\n\n"
               + "Try different values for inputs.\n"
               + "First consider a smaller time increment.\n"
               + "Other considerations should include using \n"
               + "a different altitude, trajectory angle or lesser velocity.\n"
               + "Several types of changes in input values "
               + "can resolve this problem.");
          if (trajectory_angle > MAX || trajectory_angle < MIN)
               sentinel = false;
     }  // end method t_r_a_test
     public void a_r_e_test (double altitude) throws Are {   
          if ( altitude > MAX_ALTITUDE )     
                      throw new Are("\naltitude "
               + altitude + " is outside of allowable range\n\n" 
               + "( " + MIN_ALTITUDE + " <= altitude <= "
               + MAX_ALTITUDE + " )\n\n"
               + "Try different values for inputs.\n"
               + "First consider a smaller time increment.\n"
               + "Other considerations should include using \n"
               + "a different altitude, trajectory angle or lesser velocity.\n"
               + "Several types of changes in input values "
               + "can resolve this problem.");
               if ( altitude > MAX_ALTITUDE )     
                    sentinel = false;
     }  // end method a_r_e_test
     public void n_v_test (boolean value) throws Nve {   
          if ( value == false ){
               if( span < 0 ){
                     span = 0;
                           throw new Nve("\nValue for "
                    + " span must not be negative\n\n" 
                    + "Try another value ");
               if( chord < 0 ){
                     chord = 0;
                           throw new Nve("\nValue for "
                    + " chord must not be negative\n\n" 
                    + "Try another value ");
               if( thickness < 0 ){
                     thickness = 0;
                           throw new Nve("\nValue for "
                    + " thickness must not be negative\n\n" 
                    + "Try another value ");
               if( mass < 0 ){
                     mass = 0;
                           throw new Nve("\nValue for "
                    + " mass must not be negative\n\n" 
                    + "Try another value ");
               if( altitude < 0 ){
                    altitude = 0;
                           throw new Nve("\nValue for "
                    + " start altitude must not be negative\n\n" 
                    + "Try another value ");
               if( altitude_end < 0 ){
                    altitude_end = 0;
                           throw new Nve("\nValue for "
                    + " end altitude must not be negative\n\n" 
                    + "Try another value ");
               if( velocity < 0 ){
                    velocity = 0;
                           throw new Nve("\nValue for "
                    + " velocity must not be negative\n\n" 
                    + "Try another value ");
               if( time_increment < 0 ){
                    time_increment = 0;
                           throw new Nve("\nValue for "
                    + " time increment must not be negative\n\n" 
                    + "Try another value ");
               if( rotation_factor < 0 ){
                    rotation_factor = 0;
                           throw new Nve("\nValue for "
                    + " rotation factor must not be negative\n\n" 
                    + "Try another value ");
          } //end if( value == false )
     }  // end method n_v_test
     // process events
     public void actionPerformed( ActionEvent event )
          // process spanField
          if( event.getSource() == spanField ) {
               span_string = spanField.getText();
               span = Double.parseDouble( span_string);
          // process chordField
          if( event.getSource() == chordField ) {
               chord_string = chordField.getText();
               chord = Double.parseDouble( chord_string);
          // process thicknessField
          if( event.getSource() == thicknessField ) {
               thickness_string = thicknessField.getText();
               thickness = Double.parseDouble( thickness_string);
          // process massField
          if( event.getSource() == massField ) {
               mass_string = massField.getText();
               mass = Double.parseDouble( mass_string);
          // process altitudeField
          if( event.getSource() == altitudeField ){
               altitude_string = altitudeField.getText();
               altitude = Double.parseDouble( altitude_string);
          // process altitude_endField
          if( event.getSource() == altitude_endField ){
               altitude_end_string = altitude_endField.getText();
               altitude_end = Double.parseDouble( altitude_end_string);
          // process trajectory_angleField
          if( event.getSource() == trajectory_angleField ){
               trajectory_angle_string = trajectory_angleField.getText();
               trajectory_angle = Double.parseDouble( trajectory_angle_string);
          // process time_incrementField
          if( event.getSource() == time_incrementField ){
               time_increment_string = time_incrementField.getText();
               time_increment = Double.parseDouble( time_increment_string);
          // process velocityField
          if( event.getSource() == velocityField ){
               velocity_string = velocityField.getText();
               velocity = Double.parseDouble( velocity_string);
          // process rotation_factorField
          if( event.getSource() == rotation_factorField ){
               rotation_factor_string = rotation_factorField.getText();
               rotation_factor = Double.parseDouble( rotation_factor_string);
          // process startButton event
          if ( event.getSource() == startButton )
               if( altitude > MAX_ALTITUDE)
                    reset();
               strtb();
          // process resetButton event
          if ( event.getSource() == resetButton )
               reset();
          // process two_d_sButton
          if( event.getSource() == two_d_sButton )
               Trajectory.this.layout.next(Trajectory.this.getContentPane());
               String options = "After you perform a simulation you must terminate "
                         + "by using browser back button.\n"
                         + "Then, you can begin a new simulation by "
                         + "mouse clicking the Trajectory Program link again.";
               JOptionPane.showMessageDialog( null, options);
          // process calcButton
          if( event.getSource() == calcButton )
               Trajectory.this.layout.previous(Trajectory.this.getContentPane());
          // process simstartButton event
          if ( event.getSource() == simstartButton )
               strtsim();
          // process simresetButton event
          if ( event.getSource() == simresetButton )
               resetsim();
          // process a tick from the animation timer
          if (event.getSource() == mAnimationTimer) {
               mCurrentPoint++;
               data_area.setText( get_data() );
               mSimPanel.repaint();
     } // end method actionPerformed
     public String get_data(){
          int index;
          index = mCurrentPoint;
          if(mCurrentPoint >=  time_counter )
               index = time_counter;
          String time_string = "";
          String dist_string = "";
          int min = 0;
          int sec = 0;
          int fdist = 0;
          int mdist = 0;
          min = (int)Results_Array[ index ][ 0 ] / 60;
          sec = (int)Results_Array[ index ][ 0 ] - (min  * 60);
          mdist = (int)Results_Array[ index ][ 2 ];
          fdist = (int)Results_Array[ index ][ 5 ] - (mdist * 5280);
          if((int)Results_Array[ index ][ 0 ] < 60 )
               time_string = (int)Results_Array[ index ][ 0 ]  + " sec" ;
          else
               time_string = min +  " min + " + sec + " sec" ;
          if((int)Results_Array[ index ][ 5 ] < 5280 )
               dist_string = (int)Results_Array[ index ][ 5 ] + " feet";
          else
               dist_string = mdist + " miles + " + fdist + " feet";
          data_area_string = "Elapsed Time:  " + time_string
               + "\tDistance: " + dist_string
               + "\tAltitude: " + (int)Results_Array[ index ][ 1 ]  + " feet\n"
               + "Velocity: " + (int)Results_Array[ index ][ 3 ]  + " fps"
               + "\t\tTrajectory Angle: " + (int)Results_Array[ index ][ 4 ]  + " degrees";
          return data_area_string;
     }  // end method get_data
     public void strtsim(){
          time_count = getPointCount(time_counter);
          erase = true;
          animate = true;
          int delay = 1000;
          mCurrentPoint = 0;
          mAnimationTimer = new Timer(delay, this);
          mAnimationTimer.start();
     } // end method strtsim
      * Returns the current point to be displayed in any ongoing animation.
     public Point getCurrentAnimationPoint() {
          if(scale_type)
               return new Point((int)Results_Array[mCurrentPoint][2], (int)Results_Array[mCurrentPoint][1]);
          else
               return new Point((int)Results_Array[mCurrentPoint][5], (int)Results_Array[mCurrentPoint][1]);
     public void resetsim(){
          mAnimationTimer.stop();
          animate = false;
          data_area_string = "";
          data_area.setText( data_area_string );
          reset();
          System.gc();
          System.runFinalization();
     } // end method resetsim
     public int getPointCount(int time_counter_value){
          int point_count = 0;
          point_count = time_counter_value + 1;
          return point_count;
     public void strtb()
          try{          
               span = Double.parseDouble( spanField.getText() );
               chord = Double.parseDouble( chordField.getText() );
               thickness = Double.parseDouble( thicknessField.getText() );
               mass = Double.parseDouble( massField.getText() );
               altitude = Double.parseDouble( altitudeField.getText());
               altitude_end = Double.parseDouble( altitude_endField.getText());
               velocity = Double.parseDouble( velocityField.getText());
               trajectory_angle = Double.parseDouble( trajectory_angleField.getText());
               time_increment = Double.parseDouble( time_incrementField.getText() );     
               rotation_factor = Double.parseDouble( rotation_factorField.getText() );          
               // test input
               if( span < 0 || chord < 0 || thickness < 0 || mass < 0
                    || altitude < 0 || altitude_end < 0 || velocity < 0
                    || time_increment < 0 || rotation_factor < 0 )
               value = false;
               t_r_a_test( trajectory_angle );
               n_v_test( value );
               a_r_e_test( altitude );
               // calculate trajectory     
               calculate( );
               impact_energy_calc();
               // set up panelB
               mSimPanel = new SimulationPanel(this, 0, max_screen_distance_scale, 0, max_screen_altitude_scale);               
               mSimPanel.setLayout(new FlowLayout());
               // set up sim box & simbox2
               Box simbox = Box.createHorizontalBox();
               Box simbox2 = Box.createHorizontalBox();
               Dimension minSizesim = new Dimension(10, 30);
               Dimension prefSizesim = new Dimension(10, 30);
               Dimension maxSizesim = new Dimension(Short.MAX_VALUE, 30);
               simbox.add(new Box.Filler(minSizesim,prefSizesim,maxSizesim) );
               simstartButton = new JButton ( "START" );
               simbox.add( simstartButton );
               simbox.add(new Box.Filler(minSizesim,prefSizesim,maxSizesim) );
               simresetButton = new JButton ( "RESET" );
               simbox.add( simresetButton );
               simbox.add(new Box.Filler(minSizesim,prefSizesim,maxSizesim) );
               calcButton = new JButton("Calculation");
               simbox.add( calcButton );
               simbox.add(new Box.Filler(minSizesim,prefSizesim,maxSizesim) );
               simbox.add( Box.createVerticalStrut (10) );
               data_area = new JTextArea( data_area_string, 1, 50);
               data_area.setEditable( false );
               simbox2.add(data_area);
               simbox2.add( Box.createVerticalStrut (10) );
               // add simbox & simbox2 to panelB
               mSimPanel.add (simbox);
               mSimPanel.add (simbox2);
               this.getContentPane().add(mSimPanel, "2D Simulation");
               // register calcButton event handler
               calcButton.addActionListener(this);
               // register simstartButton & simresetButton
               simstartButton.addActionListener(this);
               simresetButton.addActionListener(this);
               // display results for panelA
               results();
               resultsArea.setText( results() );
               String work_string =
                    "The 2D Simulation is a work in progress so functionality is limited.\n"
                    + "It is best to verify the following results' values before beginning 2D Simulation: \n"
                    + "* Elapsed Time greater than 1 second\n"
                    + "* Distance greater than .001 miles\n"
                    + "Check back later for improvements in real time simulation.";
               JOptionPane.showMessageDialog( null, work_string);
          }//end try
          // process improperly formatted input
          catch ( NumberFormatException numberFormatException ) {
               JOptionPane.showMessageDialog( this,
               "You must enter numbers in decimal format or integers"     ,
               "Invalid Number Format" ,
               JOptionPane.ERROR_MESSAGE );
          } // end catch NumberFormatException
          catch ( ArithmeticException arithmeticException ) {
               JOptionPane.showMessageDialog( this,
               arithmeticException.toString(), "Arithmetic Exception" ,
               JOptionPane.ERROR_MESSAGE );
          } // end catch ArithmeticException
          catch ( Tare tare ) {
               JOptionPane.showMessageDialog( this,
               tare.toString(), "-90 <= range <= 90 " ,
               JOptionPane.ERROR_MESSAGE );
          } // end catch Tare
          catch ( Nve nve ) {
               JOptionPane.showMessageDialog( this,
               nve.toString(), " value less than zero" ,
               JOptionPane.ERROR_MESSAGE );
          } // end catch Nve
          catch ( Are are ) {
               JOptionPane.showMessageDialog( this,
               are.toString(), " value greater than maximum" ,
               JOptionPane.ERROR_MESSAGE );                    
          } // end catch Are
     }  // end method strtb
     public void reset()
          span_string = "";
          chord_string = "";
          thickness_string = "";
          mass_string = "";
          altitude_string = "";
          altitude_end_string = "";
          velocity_string = "";
          trajectory_angle_string = "";
          time_increment_string = "";
          rotation_factor_string = "";
          results_string = "";
          spanField.setText( span_string );
          chordField.setText( chord_string );
          thicknessField.setText( thickness_string );
          massField.setText( mass_string );
          altitudeField.setText( altitude_string );
          altitude_endField.setText( altitude_end_string );
          velocityField.setText( velocity_string );
          trajectory_angleField.setText( trajectory_angle_string );
          time_incrementField.setText( time_increment_string );
          rotation_factorField.setText( rotation_factor_string );
          resultsArea.setEditable( true );
          resultsArea.setText( results_string );
          resultsArea.setEditable( false );
          span = 0;
          chord = 0;
          thickness = 0;
          mass = 0;
          altitude = 0;
          altitude_end = 0;
          velocity = 0;
          trajectory_angle = 0;
          time_increment = 0;
          rotation_factor = 0;
          distance = 0;
          velocity_fps = 0;
          elapsed_time = 0;
          value = true;
          temp_Rank = 0;
          viscosity = 0;     
          density = 0;
          status_2 = true;
          orbit = 0;
          orbit_dbl = 0.0;
          new_distance = 0.0;
          c_miles = 0.0;
          d_min = 0.0;
          min = 0;
          sec = 0.0;
          Joules = 0.0;
          Tons_of_TNT= 0.0;
          Pounds_of_TNT= 0.0;           
          KiloTons_of_TNT= 0.0;
          Hiroshima_Bomb= 0.0;
          angleB = 0;
          max_dis = 0;
          max_screen_altitude_scale = 0;
          max_screen_distance_scale = 0;
          mCurrentPoint = 0;
          time_counter = 0;
          m = 0;
          n= 0;
          for( m = 0; m < MAX_TIME; m++ )
               for( n = 0; n < 6; n++ )
                    Results_Array[m][n] = 0;
     }   // end method reset
     public void calculate()
          double     s_x,                         //     distance in x direction
               s_y,                         //     distance in y direction
               s_x_old,                    //     distance in x direction(old)
               g_accel,                    //     local acceleration due to gravity     
               press,                         //     air pressure          
               x_velocity,                    //     velocity in x direction
               y_velocity,                    //     velocity in y direction
               ratio_R,                    //     term variable gravity               
               rot_time,                    //     time to next rotation
               temp_dim_1,                    //     swap variable rotation
               temp_dim_2,                    //     swap variable rotation
               temp_dim_3,                    //     swap variable
               c,                         //       local speed of sound
               Reynolds,                    //     Reynolds Number
               Reynolds_old,                    //     Reynolds Number(old)
               force_drag,                    //     drag force
               force_drag_x,                    //      drag force in x direction
               force_drag_y,                    //       drag force in y direction
               area_normal_to_flow,               //     area_normal_to_flow
               characteristic_dimension,          //     characteristic_dimension
               Cd,                         //     drag coefficient               
               M;                         //     Mach Number
          int count;                         //       counter
          int prior_time;                     //     time_counter - 1
          char test;                         //     character test condition
          boolean set_velocity;                    //     velocity set condition
          boolean change;                         //     rotation change condition
          boolean status_1;                    //     short cut condition     
          boolean status_3;                    //     short cut condition
          String short_cut;                    //     short cut message
          String input;                         //     short cut input
          String altitude_end_error_string;          
          // initialize applicable variables
          s_x = 0;
          s_x_old = 0;
          press = 0;
          x_velocity = 0;
          y_velocity = 0;     
          c = 0;     
          M = 0;
          Reynolds_old = 1;
          Reynolds = 1;
          ratio_R = 1;
          force_drag = 0;
          force_drag_x = 0.0;
          force_drag_y = 0.0;
          change = true;
          set_velocity = true;
          status_1 = true;
          status_3 = true;
          s_y = altitude;
          test = 'Y';
          rot_time = elapsed_time + time_increment * rotation_factor;
          short_cut = "";
          input = "";
          altitude_end_error_string =
               "Results have a probable error.\n"
               + "The end altitude value could be too high.\n"
               + "Reset and try some other values for inputs.";
          count = 0;
          temp_dim_1 = span;
          temp_dim_2 = chord;
          temp_dim_3 = thickness;
          if( altitude < altitude_end && trajectory_angle > 0 )
               status_2 = false;
          while(s_y > 0.0 && status_2 && sentinel)     
               // calculate local acceleration due to gravity
               ratio_R = R /( R + s_y );
               g_accel = G_SL * Math.pow( ratio_R, 2);
               // calculate air conditions
               Calc_Air( s_y );
               // kinematic reference:
               // x direction means a direction perpendicular to the
               // acceleration due to gravity with progression toward
               // a position at a later time
               // y direction means a direction having the same direction as
               // acceleration due to gravity
               // calculate velocity_fps from initial velocity(Mach Number)
               // & Reynolds
               if( set_velocity)
                    c = 49.0 * Math.sqrt(temp_Rank);
                    velocity_fps = velocity * c * 5280/3600;
                    if( trajectory_angle < 0 )
                         velocity_fps = 0 - Math.abs(velocity_fps);
                    // set velocity precision
                    if( trajectory_angle < 0.0000000001 && trajectory_angle > -0.0000000009 )
                         x_velocity = Math.abs(velocity_fps);
                         y_velocity = 0.0;
                    else if( trajectory_angle >= 89.99000000 && trajectory_angle <= 90.0000000)
                         x_velocity = 0.0;
                         y_velocity = Math.abs(velocity_fps);
                    else if( trajectory_angle <= -89.99000000 && trajectory_angle >= -90.0000000)
                         x_velocity = 0.0;
                         y_velocity = 0 - Math.abs(velocity_fps);
                    else
                         if( trajectory_angle >= 0 )
                              x_velocity = Math.abs(velocity_fps) * Math.cos(Math.abs(trajectory_angle) * Math.PI / 180);
                              y_velocity = Math.abs(velocity_fps) * Math.sin(Math.abs(trajectory_angle) * Math.PI / 180);
                         else
                              x_velocity = Math.abs(velocity_fps) * Math.cos(Math.abs(trajectory_angle) * Math.PI / 180);
                              y_velocity = 0 - Math.abs(velocity_fps) * Math.sin(Math.abs(trajectory_angle) * Math.PI / 180);
                    // calculate Reynolds number
                    Reynolds = Math.abs( density * Math.abs(velocity_fps) * chord / viscosity );
                    set_velocity = false;
                    // add first results to applicable variables for plotting
                    if( elapsed_time == 0)
                         Results_Array[ time_counter ][ 0 ] = (double)time_counter;
                         Results_Array[ time_counter ][ 1 ] = altitude;
                         Results_Array[ time_counter ][ 2 ] = distance /5280;
                         Results_Array[ time_counter ][ 3 ] = velocity_fps;
                         Results_Array[ time_counter ][ 4 ] = trajectory_angle;
                         Results_Array[ time_counter ][ 5 ] = distance;
                         // determine initial maximum altitude for scale plot
                         if(time_counter == 0)
                              max_screen_altitude_scale = (int)Results_Array[ time_counter ][ 1 ];
                         // determine initial maximum distance for scale plot
                         if(time_counter == 0)
                              if(scale_type)
                                   max_screen_distance_scale = (int)Res                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • How to make a drawing area in order to get a trajectory​?

    hello everyone
    for the project that I'm working on, I need to control an XY stage.
    In order to compute the trajectory of the stage, I have to make a drawing area where the operator would draw the trajectory. and then compute it and send it to the stage.
    the question is:
    how do I make a vector drawing area?
    I thought: at each click of the mouse, the VI takes the mouse coordinate and store it. and so, I get the vectors (with a litte mathematics). and to set the speed, a text prompt opens to ask for the speed. and the VI store it in a *.txt file witch I can read with my XY stage.
    big thx 2 U thanks for reading me so far. I hope you have answers or ideas for me.
    CHKDSK

    Hello CHKDSK,
    please open the example finder (Help/Find Examples) in Labview and search for mouse.
    With the example Basic Input Demo you are able to read out the actual mouse position.
    Use the right button boolean vaule to store the correct data.
    Kind regards,
    Elmar

  • Starting a new move after an interupted trajectory

    During a move, I allow the user to interrupt the motion by issuing a stop motion command upon pressing of a command button (VB6 with Flexmotion and PCI 7340). The motion stops, but of course the target position is not reached because the user has interrupted the trajectory. If the user then initiates a new move, with a new relative target position, the motor goes to the previous target position first as if to finish the interrupted move off, before then going to the new target position. How can I stop a move before the motion is complete, such that the interrupted position is the reference for the next relative move. Any suggestions appreciated.

    Hi chips100,
    It can be easy to get the stopping types mixed up. I've found a few places you can find the differences between a halt, kill, and decelerate so that whichever source is easiest to look it up in, you'll get the information you need:
    1) In the NI-Motion VI Help documentation, the differences between the different stop types can be found under NI-Motion VI Help » Start & Stop Motion VIs » Stop Motion.
    2) In the more general NI-Motion Help (which also contains the Ni-Motion VI Help), the C-based commands for the axis can be found under NI-Motion Function Help » Start & Stop Motion » flex_stop_motion , though it does not explain the stop types as thoroughly.
    3) The same information can be found in the Developer Zone Tutorial called Stopping Modes
    Regards,
    Vijay S.
    National Instruments

  • Trajectory program event handling

    Nobody else responded to my question on the subject "Trajectory" in Java Programming forum. See my post history for problem description and code. Perhaps the subject is more appropriate here as an event handling issue. Who has the technical savvy to attempt a solution?

    (2) I wouldn't have problem with separate classes as
    long as I have no inner classes and the program
    essentially works. Sure, one 10,000 - line class may also work fine. However, it is reccommended do not make classes
    (as well as source files) very large. The reason is that long file is more difficult to debug.
    Second reason why i advised you to do that is that you mix in one class Trajectory (which is about 2000 lines long!!!) all - interface, event handling, calculations, parts responsible for 2D panel processing....
    Well, this is not Java is supoposed to be used for.
    (3) Creating object of class Falling object is
    something I'll consider. If you could show me a brief
    code example, I'll understand more.
    class fallingObject
          private double mass;
          private double speed;
          Position[] trajectory = new Position[1000];  // Create class Position each object of which holds only
          // 2 variables - x and y
         //all initial data related to this object
         fallingObject(double mass, double speed , /* the rest ........*/)
              this.mass = mass;
               this.speed = speed;
              moveObject();
              //and so on
        // some methods you need
         private moveObject ()
             // perform all calculations
             // fill array
         // etc
    Now, because all except trajectory array and constructor is private you cannot change this object outside
    class. This means that if something goes wrong with calculations, you check only this class and nothing else. In your case you can change some variable at lines 1352 and 122 - you have to check all program to find bug. Here you have to check only this class.
    You may also supply this class with mutators and accessors
    public double getMass()
       return mass;
    public void setMass(double mass) // only if you really need this
       this.mass = mass;
    The time interval
    is a tricky parameter since not all calculations work
    properly with input data; check input
    the logic would require more
    complexity and possibly cause run time problems;
    automatically testing for the appropriate time
    interval could also reduce program efficiency. Dont think so. You can calculate time of falling and divide it by 1000, for instance.
    It will take very short time.
    I don't
    want to set a limit for array points to 1000 or less
    since the precision becomes limited and the power of
    the program can be hurt severely since the time
    duration would be restricted to less than 16 2/3
    minutes( 1 second per array index increment). Dont use real time simulation. There is no sence in it. You just want to show how object is falling.
    Also, I
    don't think the array size can't be changed during a
    program run although I have set a much higher maximum
    value for array size. Theres no need to change array size.
    (4) Erasing data from textfields is something I desire
    as a calculation reset feature since it should signal
    user that it expects new data and not looking at old
    data; however, I might consider additional variables
    to hold the data. Well, man, it was quite irritating to type them in. So many fields. User is not stupid,
    he knows that he can input other data. Almost anybody will leave this page and wont want to
    fill fields again. You have to think about user, not about what you want.
    (5 )BTW, what I have in the array doesn't have the
    same precision as with the calculation mode. The 2D
    simulation uses less precise data to become visually
    practical for comprehension of users. But perhaps I
    need more than one type of array, but then again,
    performance could be a problem.
    (6) I thought the program already does take parameters
    from text fields and start again. This is what I
    desire anyway so I'm not sure why I need new start
    feature.
    (7) Restart animation seems unaccepatble since I
    prefer to treat each simulation as something based on
    new calculation data.
    I would have initially set up the program with OOD
    emphasis, but the original intent was a java
    conversion of a a C++ program that needed only a
    structured program design and the conversion worked
    fine. This Java program has evolved with the 2D
    simulation enhancements.
    When you did testing the other day, did you use
    appletviewer? I looked at it on your site using Safari and run it as application also.
    Appletviewer will not detect the problem
    so don't rely on Appletviewer to interpret the
    problem. Oddly, I wish the program behaved the same
    way as what happens when using appletviewer. In fact,
    if I could change 2d reset button logic to terminate
    and restart the entire applet again via html, then my
    problem would be solved. But I don't know if this type
    of applet restart is possible or how to effect the
    code change if feasible.

  • Plot cylinder from the equation (and a trajectory on it)

    Hello,
    for an application I need to plot a cylinder. I already found the "Create Cylinder" + "Create Object" combination for displaying a "ScenObject", but I am not sure it is the best vi I need (I also did not understand if I need 2 objects in order to use the Object.AddObjectNode, but this is a differente story).
    From an external application I get the 'a' and 'b' paramenters of the cylinder equation (X^2 / a^2) + (Y^2 / b^2) = 1, and I need to plot the cylinder starting from these parameters. Is it possible with labview?
    Moreover, once the cylinder is plotted, I should draw on its surface a trajectory: t is a sort of 'Z' trajectory that starts from a point, goes parallel to the major axis for a certain length, than starts from the first quote, but offsetted by a certaing quote along the minor axis. So the final result is a series of parallel line on a portion of the cylinder surface.
    Can you please help me figuring out a solution?
    thank you a lot in advance and best regards,
    Diego

    It will cost you approximately US$219.00 to US$299.00 depending on the model.
    Apple will replace the entire iPad; they don't repair.
    http://support.apple.com/kb/index?page=servicefaq&geo=United_States&product=ipad

  • MAX and ValueMotion: execute differently given the same trajectory parameters

    I'm trying write a LabVIEW program to move a stepper motor to a specific position at specific velocity and acceleration. The end product needs to be a user-friendly VI that can do all needed steps without the user opening Measurement and Automation Explorer(MAX).
    Here's the problem:
    The only way that I've been able to get the thing to move at the desired acceleration/ velocity profile is to make the same motion immediatly prior using MAX.
    For example, I want it to move at 2000 steps/s and 100 steps/s^2. This is what I have the initilization configuration set to. However if I pass this information directly into my labView program it actually moves differently (slower acc.) then if I run it
    directly from MAX (the interactive 1-D part). However if I make it move using MAX and then immediatly run my LAbVIEW VI it operates identically to the MAX execution.
    I've tried directly telling the VI the velocity, acc. etc. parameters, that doesn't help. The acceleration factor everywhere is the same (1). I don't understand why 100 steps/ s^2 in my LabVIEW code excutes differently at different times.
    Thanks.

    I will advise you to try out the examples shipped with LabVIEW to see if this makes a difference. You can find the examples at:
    C:\Program Files\National Instruments\LabVIEW 6\examples\Motion\ValueMotion
    ... specifically look for the library name stepper.llb which has inside an example VI named "Sequence of Moves with Low Level Parameters". Please try this example and check the VI "low level parameters" in the block diagram so you can manipulate the parameters and see if they do take effect on your motion system.
    Also make sure that you have the latest driver for Valuemotion which is 5.0.2 (http://www.ni.com/downloads/) and if you still see more issues you may want to contact us directly to troubleshoot the board or software, please find the procedure at www.ni.com/a
    sk on the web.
    Last, please do check that this settings you mention are actually set in MAX but in the axis trajectory settings, not in 1D interactive, because 1D interactive will reset to its default value whenever MAX is closed, so this is why you may be seeing the same movement only after you run MAX. Please check the example that may give us some idea, and please do it with MAX closed. Thanks!
    Regards,
    Nestor Sanchez
    Motion Control Support
    National Instruments
    Nestor
    National Instruments

  • Trajectory Generator always starts at 0, never stops

    I am trying to implement a simple single axis control based on the example shipped with Softmotion 2.2. Everything is running on a cFP and I am using an absolute wire draw encoder, outputting xx.xxx inch values. My main problem at this point is the trajectory generator. Rather than going to the target position from a current position, it always starts at zero and climbs (until manually stopped). This is after I essentially got rid of the position error limit, otherwise it would just stop immediately if the encoder was not at zero.
    Any suggestions?

    I understand the reset issue, but was under the impression that SoftMotion worked with absolute encoders as well (such that the encoder output would not have to be reset to zero for the Traj. Gen. to work). I have tried running with and without a reset on initialization of the Main vi with no affect.
    Attached is a copy of the VIs - I tried to copy all of the subVIs that I was modifying, so it's a bit of a mess compared to the original. everything is collected in the Project.
    Attachments:
    Copy of modified SM example.zip ‏913 KB

  • Trajectory generator mode de-activate

       Bonjour,
    Actuellement je pilote un moteur avec un compactRio resevant les signaux codeur sur un slot NI 9411 et envoyant la tension via le slot NI 9263.
    J'utilise le softmotion 2009 SP1 et je voudrais avoir des renseignements concernant le 'mode de-activate' du 'trajectory generator methode'.
    Désactive-t-il l'axe virtuel? (le moteur n'est plus aservi) 
    Comment est-il réactivé? (par un noeud de méthode type start?)
      Merci d'avance
      Massif

    Bonjour Massif,
    Conformément au fichier d'aide voila ce qui est dit :
    De-activate—Marks the current position as the end position but does not set Profile Complete to TRUE. When an axis or coordinate is deactivated, the Inactive parameter of the Execution Status property, returned by the Trajectory Generator Method—Execution Data method, is set to TRUE. This parameter is used to zero the command output from the control loop. It also can be used to drive a break and/or disable an amplifier.
    En clair, la sortie qui commande le moteur sera mise à zéro, l'axe n'est pas désactivé en soit, puisque cette méthode permet de définir la position actuelle comme la position de fin.
    La seule différence avec un "Stop" c'est que cette fonction ne met pas le paramètre Profile Complete à vraie. Ce qui peut être utile dans certains systèmes.
    Avez vous effectué des tests avec ce paramètre pour cette méthode ?
    Cordialement,
    De-activate—Marks the current position as the end position but does not set Profile Complete to TRUE. When an axis or coordinate is deactivated, the Inactive parameter of the Execution Status property, returned by the Trajectory Generator Method—Execution Data method, is set to TRUE. This parameter is used to zero the command output from the control loop. It also can be used to drive a break and/or disable an amplifier.

  • Convert NMEA to trajectory script

    Hallo,
    I was wondering how to convert a NMEA -file into a Trajectory script?
    Do someone here, know how to do this or about a tool which might help to  do it?
    Thanks for your support
    Aristocrate

    I tried it, but does not play, remains stopped in the first frame.
    /* js
    var tl=this;
    myFunction();
    function myFunction() {
    tl.gotoAndPlay(Math.floor(Math.random() * 150) + 2);

  • How would you model a trip or trajectory with Spatial ?

    Hello,
    I have a design question that is probably simple : "how would you model a trip/trajectory with Spatial".
    I would like to query trips that were in a specific area between 2 dates.
    Thank you for your help
    Gregory

    Hi Gregory,
    A simple way to model a trajectory is to model it as a set of trajectory points with a timestamp.
    Each trajectory has a trajectory id as its PK.
    Table Trajectory:
    Trajectory_ID NUMBER,
    Trajectory_Pt SDO_GEOMETRY,
    Time TIMESTAMP
    The above schema enables you to query the trajectory using time, geometry, and can be used fro tracking purpose (trajectory point level).
    A complete trajectory is to query a trajectory order by the time of its trajectory points.
    If you are only interested in the full trajectory geometry and time,the following might be sufficient.
    Trajectory_ID NUMBER,
    Start_Time TIMESTAMP,
    End_Time TIMESTAMP,
    Trajectory SDO_GEOMETRY
    You can build indexes on spatial and temporal information for your query if needed.
    jack

  • SoftMotion 2010 - Trajectory Generator interface

    Hi
    I'm just upgrading from 8.6.1 to 2010 SP1, and am having some problems with the changes to the SoftMotion module.
    My code that used the Trajectory Generator interface no longer works.  I get an error message saying "Trajectory Generator Method: Library that defines the XNode cannot be found".  A quick search of the website suggests that this may be because I've got the 'Standard' version of the module, and need the 'Premium' version to use this interface.  Is that right?
    My NI licenses just got upgraded automatically (under SSP) and there was no warning that existing functionality would be removed.  Does that mean there's a simple way round this?  It doesn't look like the standard scan mode interface will do what I need.
    Thanks,
    Ian

    Hi Chris,
    I don't think my problem is due to either of those things.  I'm unable to create new VIs using the Trajectory Generator interface because those VIs don't seem to be installed.
    From the readme file you linked to:
    New Features
    The following items are enhancements or additions to the LabVIEW NI SoftMotion Module relative to the NI SoftMotion Development Module for LabVIEW.
    LabVIEW Palette Reorganization
    The VIs previously on the NI SoftMotion palette are now included on the NI SoftMotion»Advanced»Trajectory palette.
    But in my installation there isn't an Advanced palette under NI SoftMotion.  After reading the help files, I think this may be because I have the 'Standard' version of SoftMotion, not 'Premium'.  Please could you confirm whether this is the case?
    I did previously have access to this functionality (when using 8.6.1), so I don't think I'd agree with the readme's description of these changes as "enhancements or additions"!
    Regards,
    Ian

  • Precise trajectory control with PCI Step Card and triggered buffer

    Hello,
    I'm trying to use PCI STep 4OX card for precise trajectory control. Every 200ms I'm putting motion tasks into buffer and I'm using external 10ms trigger input for this buffer. For duration about 100ms per one tick of trigger is fine, but I need make change in position every 10ms and it seems unusable.
    Where is the problem? What is maximal duration of trigger puls, what max freq. of this pulses ... etc.
    Thank you for your answers and suggestions,
    Vaclav Maixner
    System Engineer

    The board you are using is quite old and most probably will not give you the perfomrance you need. I would recommend upgrading your board to one of the 7334 series motion controllers that will surely giveyou that kind of performance throuogh their preemptive start fucntionality.

  • Read Trajectory Data Function and 7344 card

    The Read Trajectory funtion in Flexmotion is apparently able to buffer position data up to 333Hz (3ms sample time).
    Is this motion card dependent?
    I read somewhere on the forum that for the 7344 MOTION CONTROLLER, reading position is only possible up to a rate of 100 Hz (10ms sample time)?
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=5065000000080000004EB10000&UCATEGORY_0=_14_&UCATEGORY_S=0&USEARCHCONTEXT_QUESTION_0=motor+jerkiness&USEARCHCONTEXT_QUESTION_S=0
    Can anyone clarify this or alternatively explain to me how High Speed Capture could possibly be relevant to all this?
    Thanks
    Chris

    Chris,
    The difference is the hardware 3ms is a 7350 and 7344 is the 10 ms. The diference is which card you by.
    A Talley
    Applications Engineering
    National Instruments

  • Softmotion trajectory velocity seems incorrect

    What am I doing incorrect here?  I have been having a real problem getting the trajectory generator to behave as it should.  In order to trouble shoot this problem, I made a simple FPGA vi that is simply an IRQ, which sets the host loop rate.  The rest pretty much follows shipped examples.  I have a timer which times the completion of a straight line move.  This time is both inaccurate as well as imprecise.  Can someone look at my code and tell me if there is something wrong with it?
    Bscout
    PS I've also tried using a timed loop with no real improvement
    Attachments:
    Trajectory test.zip ‏322 KB

    Hi Bscout,
    I took a look at your code, and the first thing that occurs to me is that there is no target loop phase offset.  You need this to mitigate errors caused by real-time jitter.  You should take a look at (and run if you get a chance) the example code StepperGeneration.  In the realtime code associated with that project, the start of the Target Loop is offset by ((Host Loop Rate / 2) + RT response time).
    Because your code lacks this, it is likely that RT jitter is causing the loop rate to appear to be inaccurate.
    Let me know if this helps!
    Regards,
    Brandon M.
    Applications Engineer
    National Instruments

  • How the 7344 trajectory generator works?

    It says that the 7344 trajectory generators calculate the instantaneous position command that controls acceleration and velocity while it moves the axis to its target position in the 7344 user manual.
    What I want to know is that how long it will take to calculate the instantaneous position command ,and does it calculate based on not only the position commmand that the computer send to it but the feedback signals?
    Another question is:suppose I send a position command of 50rad,then how the trajectory generator works,what I means is that if the trajectory generator calculate the whole position trajectory based on the move constraints at a time or it will calculate every sample period?
    Infact i am not clear how it works?can you give me some information?
    Moreover how could I send a continuous position command to the card and make the card response in real-time ?For example I send diffent position command every 0.5ms and i hope the system can move to the preconcerted position every 0.5ms.Can the 7344 card make it ?

    Hi Robert
    In order to perform a  continuous move ,i can send a new target position to the board repeatedly ,but i am confused with following questions.
    First,i send a target position to the card and through the multistart the card starts to move,maybe this move can take several update periods .Suppose that it will take two update periods to accomplish the move,and after  one  and a half  update period i send another new target position ,so I do not kown if the card immediately start a new move ,based on the current position and new target position by ignoring the last half period or it will accmplish the last half period and then start a new move.
    Second ,if it is the first case  i would think that when the pid update period is equal to or more than the time intervals between the new target positions,then it will not work ,because everytime it is the host computer that starts the move.

Maybe you are looking for

  • Passing a default value to the master block and do the auto query

    Hi My problem is i have a MD FORM to which i have to pass a default value and do an auto query so that when i run the form the form should open with this default value and do the query and get the details. I tried many things like trying to set the v

  • :SYSTEM.MOUSE_RECORD

    Products Worked: Oracle Forms 6.0.5.0.2 /6.0.8.8.0 on NT Workstation 4 (SP6) Oracle Forms 6.0.5.29.4 on Win 95 Situation : Create a ordinary control block form with few GUI items. Block Name : MyBlock Block Type : Control Block No of Records : 1 Item

  • Problem opening internet radio stations using WMP player as default.

    I've experinced a problem whit Safari saying that i don't have WMP installed when im certain it is installed. I'm sure that it isn't a extention conflict or such. This following station is the one i've attempted to access when the problem above happe

  • Upgrading from Logic 7.0.1 to???

    I am presently at Logic 7.0.1. And at OS 10.3.5 I know that 7.2.3 needs at least OS X 10.4.3 or above. I am about to get a new internal HD and put Tiger on it. So should I wait to upgrade Logic only on the new HD with OS X 10.4.3 or higher, and do it

  • ViewWillAppear but nothing

    First: excuse me but I don't see tag for code I have a problem, I have a tabBar / NavigationBar application. I try to use viewWillAppear but nothing.  If I put a simple NSLog the console not show. Where is the problem? -(void)viewDidLoad {