compuslave
02-22-2008, 06:05 AM
I'm having trouble with a few things on this control. My biggest frustration is I am unable to get the VUACM variable to work right. If I type
VUACM[1]=$434241
VDOUT[991]=1000
I get the output I expect but if I try to use quotes with a regular character string rather than hex I get an alarm (Not my custom alarm hehe). Even the examples in the book do not work. The above example is the only way I can get anything. If I use the hex numbers to spell 'bar' then 'r' doesn't come out but instead some funky t shaped character so I guess even using hex is broke to some degree.
Also I can't find the macro registration screen in parameter set. I can write and call .SSB's using CALL but I would like to register some of these to G205 etc. Why can't I find this page? I'm not new to these machines, only this control and I'm starting to wonder if the registration is an add on option.
And last but not least I would like to find out which bit is responsible for the chuck clamp/unclamp state. I would like to use VDIN[whatever] to check for unclamp to prevent an alarm which requires a total reset of the main program. Does anyone know this bit number or know where I may be able to find it?
Thanks guys, I've been beating my head against the wall for days on this and I'm getting nowhere.
broby
02-24-2008, 05:45 PM
Hi Compuslave,
I use the following code chunk to refer to when programming user programmed alarms, has worked for me without any problems so far.
The first part is a test program to see if all is working when trying to generate an alarm on the machine.
The subprogram could be used as a generic alarm routine...
Note the use of the single quote characters when defining the error message.
Much easier to define the message like 'CHECK TOOL' than using hex codes to define the message.
IF [VC1 EQ 1] NALMA
IF [VC1 EQ 2] NALMB
IF [VC1 EQ 3] NALMC
IF [VC1 EQ 4] NALMD
GOTO NEND
NALMA
VNCOM[1]=1
MSG(ALARM LEVEL "A")
VDOUT[993]=1
NMSG
VNCOM[1]=0
GOTO NEND
NALMB
VNCOM[1]=1
MSG(ALARM LEVEL "B")
VDOUT[992]=1
NMSG
VNCOM[1]=0
GOTO NEND
NALMC
VNCOM[1]=1
MSG(ALARM LEVEL "C")
VDOUT[991]=1
NMSG
VNCOM[1]=0
GOTO NEND
NALMD
VNCOM[1]=1
MSG(ALARM LEVEL "D")
VDOUT[990]=1
NMSG
VNCOM[1]=0
NEND
M2
*
*
*
*
OALRM (ALARMOUT SUB)
IF [ALRM EQ 1] NALM1
IF [ALRM EQ 2] NALM2
IF [ALRM EQ 3] NALM3
IF [ALRM EQ 4] NALM4
IF [ALRM EQ 5] NALM5
IF [ALRM EQ 6] NALM6
IF [ALRM EQ 7] NALM7
IF [ALRM EQ 8] NALM8
IF [ALRM EQ 9] NALM9
(******************)
NALM1 (*ALARM 1*)
VUACM[1]='MESSAGE...' (ALARM TEXT, MAX 16 CHARS)
VDOUT[993]=1 (ALARM NUMBER AS SHOWN ON SCREEN)
(993 WILL GENERATE A LEVEL "A" ALARM)
********************
NALM2 (*ALARM 2*)
VUACM[1]=' '
VDOUT[993]=2
********************
NALM3 (*ALARM 3*)
VUACM[1]=' '
VDOUT[993]=3
********************
NALM4 (*ALARM 4*)
VUACM[1]=' '
VDOUT[993]=4
********************
NALM5 (*ALARM 5*)
VUACM[1]=' '
VDOUT[993]=5
********************
NALM6 (*ALARM 6*)
VUACM[1]=' '
VDOUT[993]=6
********************
NALM7 (*ALARM 7*)
VUACM[1]=' '
VDOUT[993]=7
********************
NALM8 (*ALARM 8*)
VUACM[1]=' '
VDOUT[993]=8
********************
NALM9 (*ALARM 9*)
VUACM[1]=' '
VDOUT[993]=9
********************
RTS
When trying to setup a user-defined G/M code macro you have to do three steps...
1. have your program in a file with the extension of .LIB
2. go to the parameters page on the controller and select the G/M Code screen and along side the code you want to use, type in the subprogram name you are using in the .LIB file. i.e. the "O" name, not the actual filename!
3. Go to the main program page and you should see a button on the screen for registering Library files, press this button and then select your Library file. The machine will then read in all the sub programs within the selected LIB file.
Last and most important step, sit back and enjoy the ease of use with your new G or M code!
If you need to change your subroutine, you need to delete the registration and then re-register the LIB file again.
This process works on an old OSP5020M and also on a OPS-E100M controller!
Much easier on the new controls!
Cheers
Brian.
compuslave
02-24-2008, 05:56 PM
Thanks! I can't wait to try this. I'll let you know how it goes.
broby
02-28-2008, 07:05 AM
Thanks! I can't wait to try this. I'll let you know how it goes.
Have you been able to use this information yet?
compuslave
02-28-2008, 04:29 PM
Unfortunately I have not had a chance yet. I've been to busy to stop. I did some tinkering and discovered that it didn't like my choice of apostrophes and that was causing some of my alarms. I am interesting in exploring this VCOM variable you use though.
broby
02-28-2008, 04:35 PM
Yeah, you have to make sure you use the single apostrophe ' not the double quotes " when using the user alarm coding.
Also make sure your alarm string is no longer than 16 characters.
Best of luck, I know what you mean when trying to get time to try things on a machine! It can get frustrating trying to do both production and improve production at the same time by using smarter programs.
Cheers
Brian.
broby
02-28-2008, 04:40 PM
Oh I have just realised that your controller is for a Lathe!
I have noticed in the past that there was some subtle differences between Lathe and Mill controllers worked from Okuma.
Like I found that the message command that worked fine on an OSP5020M did not work at all on the Lathes! Go figure!
Anyway, I suppose that this controller being much newer it may well work now... will have to try it and see what happens I guess.
Cheers
Brian.
compuslave
03-19-2008, 05:38 AM
Any luck yet?
I've been way to busy to tinker lately. I look forward to finding some time to play around though.