added LSL2 stored procedures

This commit is contained in:
Infineon\StieberD
2024-03-25 14:46:21 -07:00
parent 09f1a66046
commit c667dd56eb
1655 changed files with 527967 additions and 0 deletions

View File

@ -0,0 +1,39 @@
compile subroutine calculator_resrho_valid(ConvType, DataIo, Branch, ReturnedValue)
begin condition
pre:
post:
end condition
declare function msg, get_property, set_property
declare subroutine update_index, extract_si_keys
$insert logical
$insert msg_equates
equ valid$ to 0 ;* successful
equ invalid_msg$ to 1 ;* bad data - print error message window
equ invalid_conv$ to 2 ;* bad conversion - " "
equ invalid_nomsg$ to 3 ;* bad but do not print the error message window
equ CrLf$ to char(13):char(10)
* THIS IS SIMPLY TO CALCULATE RESISTIVITY NOT TO VALIDATE RESRHO FOR THE
* CALCULATOR, CAUSE THERE IS NO SPEC
ReturnedValue = DataIo
status() = Valid$
begin case
case ConvType = 'ICONV'
Thickness = iconv( get_property( @window:'.THICKNESS_READINGS', 'ARRAY' ), 'MD2' )
SheetRHO = get_property( @window:'.SHEETRHO_READINGS', 'ARRAY' )
OffSet = str( '.001':@vm, 17 )
OffSet[-1,1] = ''
Res = oconv( SheetRHO *** Thickness *** OffSet, 'MD3' )
swap '.000' with '' in Res
Void = set_property( @window:'.RES_READINGS', 'ARRAY', Res )
case ConvType = 'OCONV'
* no output
ReturnedValue = DataIo
case otherwise$
ReturnedValue = ''
status() = invalid_conv$
end case
return