Tom Rathbun Posted September 23, 2023 Share Posted September 23, 2023 it is possible to use the READ command to send parameters to subroutines. For example G04 X10.5 can be used to create a Dwell by creating a program 1000 with a line 4000. G04 in the main program jumps to the that subprogram line then using a READ(X) command that will assign D27=10.5 then do a DWELL(D27*1000) to create a 10.5 second dwell. This is Great but I want to use a T value but the default function of T is to call subprogram 1004. This works OK when you are using T to define a Tool Pocket but not so well when T defines a Tool Number between 1-999. It is not practical to create a subprogram with entries for all 1000 possible tool numbers when practically only 10-20 of them will ever be used. Long windup to ask the question, is it possible to use the READ(T) command to get a value from a program line like T183G06? I want to use G06 to command the Tool Change and extract the 187 and use it to look up the Tool Length and the Pocket that stores Tool Number 187. I have not had success trying this. Quote Link to comment Share on other sites More sharing options...
steve.milici Posted September 25, 2023 Share Posted September 25, 2023 Yes, you should be able to read the T-value in D20. Note that for a “READ(X)” the variable D24 is used, not D27. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.