G Code

Icons & Hints Examples
Hints: This command is used at the start of G Code programs (Compute Level 4 & 5) in which you want to manipulate data sets that have already been uploaded to your project.
This piece of code takes data from the Red Bin, fits a line to it, and puts the plot in the Brown Bin.
Hints: Use this command to extract the X and Y axis from a data set so that you can perform operations on the independent data. This piece of code extracts the first (0) data set from the blue bin, subtracts 10 from the X axis, recombines the 2 axes, and plots the result in the Yellow Bin.
Hints: Use this to combine independent axes or arrays into a graph. This piece of code extracts the first (0) data set from the blue bin, subtracts 10 from the X axis, recombines the 2 axes, and plots the result in the Yellow Bin.
Hints: Use this command to put to separate plots on the same graph. This is useful for combining data averages collected from different sensors or for creating custom views of data. This piece of code averages all the lines in the Red Bin and averages all the lines in the blue bin. It then combines them into one plot that is plotted in the lavender bin.
Hints: Use this to combine independent axes or arrays into a graph. This piece of code separates the data in the lavender bin into separate X and Y arrays. 10 is added to the Y array and the result is plotted to the lavender bin. When viewed in the View and Compare area, the lavender bin will have 2 plots -- the original data and the adjusted data created with the code above.
Hints: Use this command to put a plot into a bin. This piece of code would take data from the Red Bin, fit a line to it, and put the plot in the Brown Bin.
Hints: This command takes a bin with multiple plots and averages them into a single plot. This piece of code creates a graph that is the average of all the lines in the light blue container and plots it to the olive container. Use the Compare template in the View and Compare area to see the original data in light blue bin and the averaged data in the olive bin.
Hints: Well Time is the time between two peaks (peaks are defined as values above a threshold or cutoff value). Use this command to determine the amount of time between peaks (below the cutoff value) of a data set. If you have multiple peaks on your graph, this command will return a graph of the well times between each one. Useful for measuring for time between touch sensor presses or light sensor spikes. This piece of code creates a graph of all the well times below the cutoff value for the red data set and plots it in the purple bin.
Hints: Peak time is the time between two wells (wells are defined as values below a threshold or cutoff value). Use this command to determine the amount of time between peaks (above the cutoff value) of a data set. If you have multiple peaks on your graph, this command will return a graph of the well times between each one. Useful for measuring for time between touch sensor presses or light sensor spikes. This piece of code creates a graph of all the peak times above the cutoff value for the red data set and plots it in the purple bin.
Hints: The threshold command allows you to extract data from a data set based on bounds within the data set or bound of a second data set. This piece of code extracts the values from the data set in the purple bin if the data in the orange bin is between 70 and 101 and plots the result to the green bin.
Hints: Use this command to fit a line to your data. If you need other information about your line (Offsets and Slopes) these can be displayed on the front panel. This piece of code takes data from the Red Bin, fits a line to it, and puts the plot in the Brown Bin.
Hints: Use this command to fit a curve to your data. You can specify the curve order fit (using a numerical constant). The coefficients and equation of the line can be displayed on the front panel. This piece of code takes the data in the Red Bin, fits a 3rd order curve to it, and plots the result in the Brown Bin. The equation of the curve is displayed on the front panel using an indictor.
Hints: Use this command to fit an exponential curve to your data. The damping, amplitude, and equation of the line can be displayed on the front panel. This piece of code takes the data in the Red Bin, fits an exponential curve to it, and plots the result in the Brown Bin. The equation of the curve is displayed on the front panel using an indicator.
Hints: Histograms are useful for plotting the distribution of your data (how often you measured certain values or certain ranges of values). This piece of code takes the data from the Red Bin, creates a histogram of the data (using 15 bins), and plots the result to the Brown Bin.
Hints:Use this command to integrate data. If multiple plots are input each one will be integrated separately. This piece of code takes the data from the yellow bin, integrates it, and plots the result in the Brown Bin.
Hints:Use this command to differentiate data. If multiple plots are input each one will be differentiated separately. This piece of code takes the data from the yellow bin, differentiates it, and plots the result in the Brown Bin.
Hints: Use this command to create a plot of the maximum value in a data set. The value can also be displayed on an indicator on the front panel. This piece of code takes data from the yellow bin, creates a plot of the maximum value, and plots the result in the purple bin. The mean value is also displayed in numeric form as an indicator on the front panel.
Hints: Use this command to create a plot of the mean value in a data set. The value can also be displayed on an indicator on the front panel. This piece of code takes data from the yellow bin, creates a plot of the mean value, and plots the result in the purple bin. The mean value is also displayed in numeric form as an indicator on the front panel.
Hints: Use this command to create a plot of the minimum value in a data set. The value can also be displayed on an indicator on the front panel. This piece of code takes data from the yellow bin, creates a plot of the minimum value, and plots the result in the purple bin.
Hints: Use this command to create a plot of the slope of the data set. The value can also be displayed on an indicator on the front panel. This piece of code takes data from the yellow bin, creates a plot of the slope, and plots the result in the purple bin. The mean value is also displayed in numeric form as an indicator on the front panel.
Hints: Use this command to find the area under the curves of a graph. The area is displayed best as an indicator on the front panel. This piece of code takes data from the yellow bin and calculates the area under the curves. The result is displayed as an indicator on the front panel.
Hints: Use this command to find the standard deviation of data. This piece of code takes data from the yellow bin, calculates the standard deviation, and plots the result to the purple data bin. To view the original data and the standard deviation at the same time use the Compare template in the View and Compare section of Investigator.
Hints: Use this command to fit a y=AlnX + B line to the desired Data Set. The equation of the fit line, offsets, and slopes can be displayed on the front panel using indicators. This piece of code takes data from the yellow bin, fits a y=AlnX + B line to the data, plots the result in the purple bin and displays the equation of the fit on the front panel. To view the original data and the fit data at the same time use the Compare template in the View and Compare section of Investigator.
Hints: Use this command to fit a spline to the desired Data Sets. Choose 'Spline fit to Data Sets' to display ONLY the spline fit or choose Original and fitted curve to display both. The coefficients and equation string can be displayed on the front panel using indicators. This piece of code takes data from the yellow bin, fits a spline to the data, plots the result in the purple bin and displays the equation of the fit on the front panel. To view the original data and the fit data at the same time use the Compare template in the View and Compare section of Investigator
Hints: Use this command to find the Power Spectrum of a data set. Useful for determining the frequency of a waveform in a data set. This piece of code takes data from the blue bin, finds the power spectrum of it and plots the result in the green bin
Hints: Use this command to upload data directly from the RCX. Useful if you often work in levels 4 & 5 of G-Code or if you are using data logging functions in Inventor. This piece of code uploads data from the RCX, takes the second data set, finds the histogram, and plots the result in the green bin.
Hints: Use this command to load data into Investigator from an external file. When a program is run containing this command, you will be prompted to find the location of the file you wish to load. This can be useful if you want to transfer data from one Investigator project to another (export the data from one project and load it into another). This piece of code prompts the user to specify a file to load, fits a curve to it and plots the result in the Brown Bin.
Hints: Use this command to save Investigator into an external file. When a program is run containing this command, you will be prompted to specify a name and location for the file you wish to save. This can be useful if you want to transfer data from one Investigator project to another (export the data from one project and load it into another). This piece of code takes data from the Red Bin, averages the line, and then saves the result to a file specified by the user.
Hints: Use the bins to organize and retrieve data. Bins can contain multiple plots. It is best to use one bin per type of data you are collecting (Use the Red Bin for light data, the Blue Bin for temperature data etc...) This piece of code takes data from the Red Bin, fits a line to it, and puts the plot in the Brown Bin..
Hints: Use the bins to organize and retrieve data. Bins can contain multiple plots. It is best to use one bin per type of data you are collecting (Use the Red Bin for light data, the Blue Bin for temperature data etc...) This piece of code extracts the first (0) data set from the blue bin, subtracts 10 from the X axis, recombines the 2 axes, and plots the result in the Yellow Bin.
Hints: Use the bins to organize and retrieve data. Bins can contain multiple plots. It is best to use one bin per type of data you are collecting (Use the Red Bin for light data, the Blue Bin for temperature data etc...) This piece of code extracts the first (0) data set from the blue bin, subtracts 10 from the X axis, recombines the 2 axes, and plots the result in the Yellow Bin.
Hints: Use the bins to organize and retrieve data. Bins can contain multiple plots. It is best to use one bin per type of data you are collecting (Use the Red Bin for light data, the Blue Bin for temperature data etc...). This piece of code averages all the lines in the Red Bin and averages all the lines in the blue bin. It then combines them into one plot that is plotted in the lavender bin.
Hints: Use the bins to organize and retrieve data. Bins can contain multiple plots. It is best to use one bin per type of data you are collecting (Use the Red Bin for light data, the Blue Bin for temperature data etc...) This piece of code takes data from the Red Bin, fits a line to it, and puts the plot in the Brown Bin.
Hints: Use the bins to organize and retrieve data. Bins can contain multiple plots. It is best to use one bin per type of data you are collecting (Use the Red Bin for light data, the Blue Bin for temperature data etc...) This piece of code extracts the values from the data set in the purple bin if the data in the orange bin is between 70 and 101 and plots the result to the green bin.
Hints: Use the bins to organize and retrieve data. Bins can contain multiple plots. It is best to use one bin per type of data you are collecting (Use the Red Bin for light data, the Blue Bin for temperature data etc...) This piece of code creates a graph that is the average of all the lines in the light blue container and plots it to the olive container. Use the Compare template in the View and Compare area to see the original data in light blue bin and the averaged data in the olive bin.
Hints: Use the bins to organize and retrieve data. Bins can contain multiple plots. It is best to use one bin per type of data you are collecting (Use the Red Bin for light data, the Blue Bin for temperature data etc...) This piece of code creates a graph that is the average of all the lines in the light blue container and plots it to the olive container. Use the Compare template in the View and Compare area to see the original data in light blue bin and the averaged data in the olive bin.
Hints: Use the bins to organize and retrieve data. Bins can contain multiple plots. It is best to use one bin per type of data you are collecting (Use the Red Bin for light data, the Blue Bin for temperature data etc...) This piece of code extracts the values from the data set in the purple bin if the data in the orange bin is between 70 and 101 and plots the result to the green bin.
Hints: Use the bins to organize and retrieve data. Bins can contain multiple plots. It is best to use one bin per type of data you are collecting (Use the Red Bin for light data, the Blue Bin for temperature data etc...) This piece of code extracts the values from the data set in the purple bin if the data in the orange bin is between 70 and 101 and plots the result to the green bin.
Hints: Use this bin when you want to retrieve information from data in every bin. This can be useful if you have used different bins to divide up multiple runs of the same type of data (light, temp etc..) This piece of code will take the data from all of the bins, average the lines, and plot the result in the light blue bin.