Custom Plot Pre-Processor
Inplot specializes in FANUC type program code, but with this feature an Inplot script or ActiveX control or VB Script can be attached to plot button so that as Inplot goes through the editor, each line can be processed before it is sent to Inplot to be plotted. Every line can be interpreted, changed, or modified -- so it is possible to make a pre-process script that will understand the special codes or variables in the program.
You attach this script to the plot button by putting the name of the script in the machine configuration toolbox settings. Every time the plot button is pressed, the script is run for that line.
A script that just had this line:
PLOT,$
would pass through the current line in the editor to Inplot to be plotted. This would plot the same way as without a pre-process script.
A script that had this line:
PLOT,G#11X#1Y#2Z#3F#4
would substitute whatever values were in those script variables and send it to Inplot to be plotted.
VB Script Pre-Processor
With the Inscript Plug-In you can use VB Script to pre-process every line.
1. Install the Inscript Plug-In into Inplot
2. Make VB Script with a function with the name 'PlotEvent':
Function PlotEvent(S)
End Function
Inplot calls this function every time the current line in the editor is about to be plotted. The parameter is the a string containing the current editor line.
It can be changed and returned to Inplot. Then Inplot will plot the new string.
3. Put some actions in the Function to format the line so it can be interpreted correctly by Inplot.
Function PlotEvent(S)
x=instr("G02",s)
if x>0 then 'change all G02 to G03
s=left(s,1,x) & "03" & right(s,len(s)-x)
end if
PlotEvent=S 'sends the string back to Inplot for plotting
End Function
See Script , ActiveX , Ole Server
_________________________________________________________________
Copyright © 2020 i-Logic Software