Okuma Array type creation?
Hello everyone,
On an Okuma LB35 with OSP300L controller...
I have a problem that I would like to use the following syntax
V[V1]=xxx
where V1 would be changed in the macro that would create a series of X and Z coordinates.
The desire is that I could interate through the positions up to the end of the profile as calculated.
The number of positions is calculated at run time and not known before.
The machine will not allow this type of referencing and just error's out when encountering the code.
Does anyone know how I could create the equivalent of this type of coding in Okuma's User Task II language?
Thanks
Brian.
Re: Okuma Array type creation?
hy broby :) on lathes, this syntaxes are equivalent : V1 = 123, VC[1] = 123 , VC [0001] = 123, so try VC [ VC [ 1 ] ]
Quote:
number of positions is calculated at run time and not known before
that's a dynamic array :) if overall, highest position is :
... <max admisible number of common variables(usually 200), then, at the end, store array length in V200; even if you need it, is possible to avoid storing the array length, by simply initializing all variables with a value that is not relevent for the process ( for example 0, or -123, etc ), and, after all data has been recorded, you may find the array length by scrolling through variables until 0/-123/whatever value appears :)
... >max admisible number of common variables, then replace common variables with files, thus store data using fwrit *.*;C, then, at the end, store array length in a separate file, or inside a common variable; even if you need it, is possible to avoid storing the array length, by using timestamps, like, for example, a series is interrupted by a differencies in timestamps that is almost equal to setup time ( for example, if data is being recorder at intervals of 1 seconds, then you may consider that serie is interrupted when interval is > 10 seconds eq )
Quote:
series of X and Z coordinates
you may use :
... odd and even common variables
...... and/or
... separate files
...... and/or
... a single file, with each line containing:
...... a pair of XZ, separated by tab
......... and/or
... more than a pair of XZ, separated by tabs, in order to speed up processing speed ( also, if there is a lot of such operations, noex should help )
like i usually say : if you wish, describe a little better what you wish to achieve, and i may give you code for both recording data, and processing data part
by the way, there is a nice okuma forum somewhere arround here :)
Re: Okuma Array type creation?
Quote:
Originally Posted by
deadlykitten
hy broby :) on lathes, this syntaxes are equivalent : V1 = 123, VC[1] = 123 , VC [0001] = 123, so try VC [ VC [ 1 ] ]
Actually Mr Kitty, you are incorrect, V1..V200 is available on the Lathe and VC1..VC200 is available on the Mills
The desire, and in truth, the requirement is to NOT use an external file as apprentices and others, not so knowledgeable, are to use this program... should I get it working to the desired level of usability.
As for supplying further operational requirements for the program, nope, not happening.
Brian.
Re: Okuma Array type creation?
Quote:
V1..V200 is available on the Lathe and VC1..VC200 is available on the Mills
just try : mdi lathe VC[1]=123 :) works at least on p200, but i don't know for lb35
Quote:
The desire, and in truth, the requirement is to NOT use an external file as apprentices and others, not so knowledgeable, are to use this program... should I get it working to the desired level of usability.
is possible to make it work, even if there are less skilled operators; is even possible to proof it against wrong usage : all under the hood :)
of course, if you can avoid files, then do it, but, just in case, maybe is good to know :)