|
|
[300]! purpose: This macro to plot zoom curv.
! The max zoom position is 6, if more ,it will not work correctly
! author: Doffery 8-sep-2003
lcl num ^i ^efl(200) ^t(6,200)
lcl str ^command ^th(6)
ver y
out no
! Active all zoom positions
pos
^numZ == (num z)
^command == ’LIN ’
for ^i 1 ^numZ
^tempstr == num_to_str(^i)
^tempstr == concat(concat(’(’, concat(’EFL Z’,^tempstr)),’) ’)
^command == concat(^command,^tempstr)
end for
BUF DEL B0
BUF
OUT y
cam; ncs 200 ! number of cam steps
$command !LIN (EFL z1) (EFL z2) (EFL z3) ! make linear in EFL
LLA ’EFL’
go
OUT YES
BUF NO ! CAM data is now in B0 buffer for later use
! Move to start of buffer and find column-head row
BUF MOV I1
^count == 0 ! num of positions
BUF FND THI
lbl FIND
if (buf.fnd)
^count == ^count +1
BUF FND
got FIND
end if
BUF MOV I1
BUF FND AND EFL THI
for ^i 1 ^count
buf mov ic jc+1
if (buf.type ic jc) = STR
if (buf.str ic jc) = THI
buf mov ic jc+1
end if
^th(^i) == (buf.str ic jc)
!^count == ^count +1
if lenstr(^th(^i)) 3
^th(^i) == substr(^th(^i),4,lenstr(^th(^i)))
end if
end if
end for
BUF MOV Ic+1 J1 ! skip blank line
write Getting zoom data from CAM table in BUF B0 -- please wait...
OUT n
for ^i 1 200 ! saving into arrays first will speed update
BUF MOV Ic+1 J1
if not ((buf.type Ic Jc+1) =NUM)
BUF MOV Ic+1 J1
end if
^efl(^i) == (BUF.NUM Ic Jc+1)
if ((buf.type ic Jc+2) =NUM)
^t(1,^i) == (BUF.NUM Ic Jc+2)
end if
if ((buf.type ic Jc+3) =NUM)
^t(2,^i) == (BUF.NUM Ic Jc+3)
end if
if ((buf.type ic Jc+4) =NUM)
^t(3,^i) == (BUF.NUM Ic Jc+4)
end if
if ((buf.type ic Jc+5) =NUM)
^t(4,^i) == (BUF.NUM Ic Jc+5)
end if
if ((buf.type ic Jc+6) =NUM)
^t(5,^i) == (BUF.NUM Ic Jc+6)
end if
if ((buf.type ic Jc+7) =NUM)
^t(6,^i) == (BUF.NUM Ic Jc+7)
end if
end for
OUT n
BUF DEL B0
ugr
xla FOCAL LENGTH(mm)
xde 1
yla ZOOM POSITION
yde 2
tit ’ZOOM position vs. EFL’
for ^i 1 ^count
dpo concat(’THI ’,^th(^i))
spl pnt ^i
for ^J 1 200
^efl(^J) ^t(^i,^J)
end for
end
end for
go
|
|