• No results found

IDX = POSTF(28,3,(ICODEF(RANGE))) IDX will be set to

In document v66 Fil CD Manual (Page 179-183)

Functionality Type Get CL Information

IDX = POSTF(28,3,(ICODEF(RANGE))) IDX will be set to

2. CL Record: SPINDL/300,HIGH,RPM,LOCK,CLW,RANGE,1 To locate the word HIGH:

IDX = POSTF(28,2,(ICODEF(HIGH))) IDX will be set to 5

3. CL Record: SPINDL/300,HIGH,RPM,LOCK,CLW,RANGE,1 To locate the word LOW:

IDX = POSTF(28,2,(ICODEF(LOW))) IDX will be set to 0 as not found

4. CL Record: SPINDL/300,RPM,CLW,RANGE,4 To locate the RANGE couplet:

IDX = POSTF(28,3,(ICODEF(RANGE))) IDX will be set to 7

5.27 Function Type 29 (Remove word/scalar/couplet in the CL

Record)

rslt = POSTF(29, arg1,arg2)

rslt: returns zero, automatically adjust the number of CL words.

arg1: type of input given in arg2

1 = remove CL word location given in arg2 2 = remove the 1st scalar matching arg2 3 = remove the minor word matching arg2

4 = remove the minor word couplet matching arg2 (2 CL words removed)

arg2: location, scalar, minor word or minor word couplet to remove

This function removes CL words from the current CL record and then adjust the length of the CL record.. The CL word can be a location, scalar, minor word or minor word couplet.

When arg1 = 1, the location index, arg2, must be greater than 3 and less than the number of words in the current CL record.

When arg1 = 2, Zero is a valid value for arg2.

When arg1 = 3, Zero is an invalid value for arg2 and will be ignored.

When arg1 = 4, A couplet is defined as a Minor Word followed by a scalar, such as RANGE,1 or MAXRPM,1500 and thus 2 words will be removed from the CL record.

Note: A couplet is defined as a Minor Word followed by a scalar, such as RANGE,1 or MAXRPM,1500. Caution: Once a word is removed, it is important to note the number of words in the current CL record will be automatically adjusted as if you executed a POSTF(12, arg1).

Example:

2. CL Record: SPINDL/300,HIGH,RPM,LOCK,CLW,RANGE,1 To remove HIGH: DMY = POSTF(29,1,5)

The resulting CL Record is: SPINDL/300,RPM,LOCK,CLW,RANGE,1 To remove LOCK: DMY = POSTF(29,1,6)

The resulting CL Record is: SPINDL/300,RPM,CLW,RANGE,1

3. CL Record: SPINDL/300,RPM,LOCK,81,CLW,RANGE,1 To remove the scalar 81: DMY = POSTF(29,2,81)

4. CL Record: SPINDL/300,HIGH,RPM,LOCK,CLW,RANGE,1

To remove HIGH, as in example 1: DMY = POSTF(29,3,(ICODEF(HIGH))) The resulting CL Record is: SPINDL/300,RPM,LOCK,CLW,RANGE,1

To remove LOCK, as in example 1: DMY = POSTF(29,3,(ICODEF(LOCK))) The resulting CL Record is: SPINDL/300,RPM,CLW,RANGE,1

5. CL Record: SPINDL/300,RPM,LOCK,81,CLW,RANGE,1

To remove the LOCK,81 couplet: DMY = POSTF(29,4,(ICODEF(LOCK))) The resulting CL Record is: SPINDL/300,RPM,CLW,RANGE,1

To remove RANGE,1 couplet: DMY = POSTF(29,4,(ICODEF(RANGE))) The resulting CL Record is: SPINDL/300,RPM,CLW

5.28 Function Type 30 (Read the Next Specified CL Record From the

CL File)

rslt = POSTF(30,arg1,arg2) (Short format)

rslt: =0 success, the desired CL record was found and the desired CL file positioning was applied.

=1 failed, the desired CL record not found, no CL file positioning was

applied.

arg1: specifies the Integer Code for the CL record type (i.e.1031 for SPINDL)

arg2: =0 re-position the CL file pointer to the original CL record position. =1 leave the CL file pointer at the new CL record position. G-Post will read and process this record.

=2 leave the CL file pointer at the next CL record, following the new CL record position. G-Post will skip and not and process this record.

Note: for arg1 you can use the integer code,1031 for SPINDL, or the function ICODEF(SPINDL). FIL requires an integer code for any major or minor words within a POSTF command.

rslt = POSTF(30,arg1,arg2,arg3[,arg4]) (Long format)

rslt: =0 success, the desired CL record was found and the desired CL file positioning was applied.

=1 failed, the desired CL record not found, no CL file positioning was

applied.

arg1: specifies the Integer Code for the CL record type (i.e.2000 for post

commands).

arg2: specifies the Integer Code for the CL record sub-type (i.e.1031 for

SPINDL).

arg3: =0 re-position the CL file pointer to the original CL record position. =1 leave the CL file pointer at the new CL record position. G-Post will

read and process this record.

=2 leave the CL file pointer at the next CL record, following the new CL record position. G-Post will skip and not and process this record.

arg4: =n Optional, limits the search to a number of records (n), 0 reads to the FINI.

Note: for arg2 you can use the integer code1031 or the function ICODEF(). FIL requires an integer code for any major or minor words within a POSTF command.

POSTF(30) function reads the next CL record, of a given type, from the CL file. The alternative to using POSTF(30) is using a combination of POSTF(14) and POSTF(15) along with a DO/loop to read ahead in the CL file, this can get complex. POSTF(30) simplifies the process of reading ahead in the CL file. When using this function to read additional CL records, each time the next CL record is read, it becomes the current CL record and the previous CL record is lost, unless it had been saved with POSTF(20).

Example:

Assume the sample input is given below:

PARTNO TEST MACHIN/UNCX01,1 SPINDL/10 FEDRAT/10 LOADTL/1 COOLNT/ON RAPID GOTO/10,10,10 CYCLE/DRILL,1,10,IPM,.1 GOTO/2,2,2 GOTO/1,1,1 CYCLE/OFF RAPID GOTO/10,10,10 FINI

1. Find the next tool number and output a message when processing the SPINDL command.

In document v66 Fil CD Manual (Page 179-183)

Related documents