hexagon logo

Variables Dropping, Lighting flipping, and problems, Global Variables. suggestions?


All,

I've been working with a hexagon tech extensively building a program template to globally handle our structure for global editing as we are re-developing our quality systems and tracking capabilities.

Note: 2017 R2 (Service Pack 5) at both locations - Programming offline at desk - Exporting to server - Running at machine

Effectively a program looks like this. (Disclaimer: I'm very much a novice at programming.)
<Initilize>
<Callsub: FormSub; Initial Form> calls the initial form for the operator input
<Callsub: VarSub; Variables> calls the global variables for light, %tol and other misc settings
<Callsub: VarSub; Tracefields> generates tracefields and writes form data to a .txt file to later be read into the part program (Done for future-proofing; ie adding tracefields globally)
<generate header page for report>

<program specific information, file paths etc.>
<program features>
<append report with features>
<save into file structure, if no file structure - create file structure>
<datapage output>
<end>


This is mostly working great. But i have a feeling that my variables are being dropped.

PROBLEM #1:
I have one variable, for parallelism, checking the cut of the sample (aluminium extrusion). The lighting variable values are passing, as well as this one, but this one will not ... sorta. If i write this code in the program
Ex:

<From VarSub>
Assign/Light=80
Assign/Light2=60
Assign/Flat=.4

<From VarSub>

<comment(y/n): FLAT>

Dim(Parallelism) <Parallelism to stage check>

If/ Parallelism.meas>FLAT
<Comment: Re cut sample>
Goto/ENDPRG
End_IF/

Label=ENDPRG





At the end of the program if i hover over the variables all of the correct values are shown. However at my comment prompt, It will show a value of one. (Edit: Incorrectly stated it was returning a Zero value, bad memory, see additional posts.)


PROBLEM #2
(See Attachments, at bottom ) When I write at my desktop, the 'physical' position that PCDMIS writes the light settings --> gets imported differently at the machine.
Ex:
At Desktop reads:
<--,YES,-1,-1,-1,NO,Top Light=<OFF,0,OFF> ,Bottom Light=<OFF,LIGHT,ON>,Ring Light=<OFF,0,OFF>

At Machine reads:
<--,YES,-1,-1,-1,NO,Bottom Light=<OFF,0,OFF> ,Top Light=<OFF,LIGHT,ON>,Ring Light=<OFF,0,OFF>

Almost as if it's reading the string file in a different order. So every offline program requires an edit for this, or I'll have to get used to programming the wrong light settings.

PROBLEM #3
I have a variable for RPT_Path... I feel like maybe this one is something I can do more investigating into. Each program contains the original assignment for this report path. Then an executable file creates a folder for the Tool Copy Number, a sub folder for the year, then a subfolder for the month and saves the file in that location. Right now it is saving it in the original test templates location.






Any thoughts would be greatly appreciated!!!!!!!!!!

Thank you!



Attached Files
Parents
  • Problem #1: Use MessageBoxes in order to trace your value through the program, making calls to messagebox to display the value - for debugging purposes.

    Problem #2: The pictures are too small to really "see" the code. If you can, cut and paste the code in here between CODE tags.

    Problem #3: As #1, populate your code with messageboxes displaying the path at certain points in order to trace your path variable - for debugging purposes.
Reply
  • Problem #1: Use MessageBoxes in order to trace your value through the program, making calls to messagebox to display the value - for debugging purposes.

    Problem #2: The pictures are too small to really "see" the code. If you can, cut and paste the code in here between CODE tags.

    Problem #3: As #1, populate your code with messageboxes displaying the path at certain points in order to trace your path variable - for debugging purposes.
Children
No Data