Mastercam后處理命令塊傳遞參數(shù)用法,新版中新加入的功能,此方法的用法非常接近VB.NET的用法,可同時(shí)傳遞多個(gè)參數(shù)。
后處理頭數(shù)據(jù),請(qǐng)勿更改
[POST_VERSION] #DO NOT MOVE OR ALTER THIS LINE# V24.00 P0 E1 W24.00 T1614093555 M24.00 I0 O1scncpost_revision := “22.81” # Internal revision number for use by CNC Software only. Please do not change this number.scustpost_revision := “0” # Revision number for use by Resellers or customers.
首先定義需要傳遞的數(shù)據(jù)
num1 : 2num2 : 3
定義接受傳遞的數(shù)據(jù):
key1 : 0key2 : 0
定義保存輸出的數(shù)據(jù)
skey : 0
定義數(shù)據(jù)輸出格式
fs2 990 9 0 9 0fmt 990 skey
對(duì)傳遞的數(shù)據(jù)進(jìn)行處理,下面的代碼為乘法運(yùn)算;
pencrypt_key(key1,key2) skey = key1 * key2
輸出結(jié)果: 6
傳遞參數(shù)并調(diào)用計(jì)算過程
pheader$ #Call before start of file pencrypt_key(num1,num2) *skey, e$
傳遞參數(shù)過程采用后處理最新技術(shù),參數(shù)傳遞的方法把目標(biāo)數(shù)據(jù)傳遞到 過程命令塊。
該方法具體可參考相關(guān)視頻