View Full Version : Okuma post modifcations?


badRandle
06-12-2003, 06:22 PM
I recently modified the V9.1 okuma post to work with our machines and controllers. It works almost perfect except for a couple of things:

How do I get an alphabetical letter to call up on each tool change?

For example:

IF [VATOL EQ 02 ] NATA
T2 M6
NATA G00 G90
M1
G15 H01

I would like the "A" at the end of NATA to change to "B" and so on alphabeticaly at each toolchange.

I was able to get the # for ASCII to post but I cant get the # to convert to the actual ASCII character in the post.
Is there a simple # to ACSII command to output the character value?

what I'm getting:

IF [VATOL EQ 01 ] NAT65
NAT65 G00 G90

what I need:

IF [VATOL EQ 01 ] NATA
NATA G00 G90


Any help or sample posts would be greatly appreciated.

Thank you. :D

HuFlungDung
06-12-2003, 07:10 PM
I know nothing about Mastercam, but is there a command anything like
CHR
or
CHAR
followed by the number of the ASCII character which you want?

Then, make a new variable to hold your character's ASCII value
thus:

Dim IntMyChar as Integer
IntMyChar = 64 'possible intial value

'start loop
IntMyChar = (IntMyChar + 1)
'trap values to within the range of upper case ASCII values
If IntMyChar < 64 Then IntMyChar = 90
ElseIf IntMyChar > 90 Then IntMyChar = 65
End If

IF [VATOL EQ 01 ] NAT(CHAR(IntMyChar))
NAT(CHAR(IntMyChar)) G00 G90
etc.

My syntax may not be exactly what you would use, but maybe it will give you an idea.
You may also need a method to save the value of IntMyChar (or whatever you choose to call it) as a global value, and this is usually done by defining the variable as global.