14
« on: April 08, 2014, 01:47:50 AM »
Hi. I am using FMD88 and I7017. LVDT probes are connected to a servo motor that will retract upon probe contact with a surface. I want to capture the maximum compression of the probes. I tried using the below custom function executed in 0.01s loop. Data can be captured sometimes only. Is the function too slow? Any way to solve the problem?
Z$ = NETCMD$(3,"#01"+CHR$(13)+"~")
FOR I = 0 to 3
DM[11+I] = VAL(MID$(Z$,2+I*7,3)+MID$(Z$,6+I*7,3)) 'Get the digits without the decimal point
If DM[11+I] < DM[21+I]
dm[21+I] = DM[11+I]
endif
NEXT