Omron SYSMAC FH Series User Manual page 470

Vision sensor vision system
Hide thumbs Also See for SYSMAC FH Series:
Table of Contents

Advertisement

Example
Gets the distribution and deviation for a line gotten from four points.
Dim POSX#(3), POSY#(3), PARAM#(2), DIST#(3)
Rem Initialize variables for straight line
For I&=0 To 3
GetUnitData I&+1, "X", POSX#(I&)
GetUnitData I&+1, "Y", POSY#(I&)
Next
Rem Get the straight line component.
Lsqumeth 4, POSX#(), POSY#(), PARAM#()
SUMDIST# = 0
For I&=0 To 3
Rem Calculate the shortest distance between the straight line and point.
DIST#(I&) = Dposline(POSX#(I&), POSY#(I&), PARAM#())
SUMDIST# = SUMDIST# + DIST#(I&)
Next
Erase POSX#(), POSY#(), PARAM#(), DIST#()
Useable Modules
Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro
Supported Versions
Version 3.50 or later
Related Items
Erase (Reference:
Lsqumeth (Reference:
468
Macro Reference
Details (p.512))
Details (p.610))
WWW.NNC.IR
GetUnitData (Reference:
UnitData (Reference:
Details (p.778))
Details (p.552))
Vision System FH/FZ5 Series
User's Manual (Z340)

Advertisement

Table of Contents
loading

Table of Contents