B.6.2 input callback, B.6.3 inputoutputtest1, B.6.4 inputoutputtest2 – ElmoMC Multi-Axis Motion Controller-Maestro User Manual

Page 278: B.7 motion objects, B.7.1 group objects, B.7.1.1 groupcommonbg, B-26

Advertising
background image

if abs(m_ain[0]) < 100

position=0
else

position = m_ain[0] * k

end

if

if abs(a1.px-position) > 100

a1.pa

=

position

a1.bg
end

if

if abs(m_ain[1]) < 100

position=0
else

position = m_ain[1] * k

end

if

if abs(a2.px-position) > 100

a2.pa

=

position

a2.bg
end

if

end function



// program to set zero value for analog input
function run()
float

sum

int

i

for

i=1:100

sum=sum+m_ain[0]
end

for

m_ain[0].offset = sum/100

sum

=

0

for

i=1:100

sum=sum+m_ain[1]
end

for

m_ain[1].offset = sum/100

end function

B.6.2

Input Callback

Refer to section B.4.5.1.

B.6.3

InputOutputTest1

Refer to section B.4.5.2.

B.6.4

InputOutputTest2

Refer to section B.4.5.3.

B.7 Motion Objects

B.7.1

Group Objects

B.7.1.1 GroupCommonBg


function run()

sync(0,30)

InitGroup(G1)

a1.px=0

Maestro

Software Manual

Appendix B: Sample Programs

MAN-MASSW (Ver. Q)

B-26

Advertising