1 user interface to create communication objects, 2 using syntax – ElmoMC Multi-Axis Motion Controller-Maestro User Manual

Page 217

Advertising
background image

Maestro

Software Manual

Ethernet/IP Communication

MAN-MASSW (Ver. Q)

11-15

Assembly objects can have one of following direction types:

Consuming- an Assembly that consumes data from the network

Producing- an Assembly that produces data on the network

Configuration- an Assembly used to store configuration data that comes with

incoming Forward Open. It should be listed as Connection Configuration Instance in
the incoming Forward Open and not used for originating connections.

11.6.1 User interface to create communication objects

User interface described in section 11.5.2.1 User interface to create communication
objects of the Manual.

Assembly data size and type (Communication Format) must be identical for both
sides of the Ethernet/IP connection: the scanner (Rockwell device) and the adapter
(Maestro device).

11.6.2 Using syntax

Assembly object using syntax described in section 11.5.2.2 Using syntax of the
Manual.

The following Maestro program listing illustrates working with Assembly objects
and task synchronization via the operator until and global variables:

Listing 1.

int gEvent, gCons
//enter point of Maestro application
//TASK 1
function run()
global

int

gEvent

TRACE( "Start Task 1..." )

gEvent

=

0

Task2.run()//run

Task2

until( gEvent != 0 )//wait global variable

TRACE( "Task 1: Event %", gEvent )

prod.Param00=1//change produsing Assembly member value

end function
// Ethernet/IP event handler
function @eipevent(int event, int param1, int param2)

global int gEvent, gCons

switch(

event

)

case(

8

)

gEvent

=

param1

case(

9

)

gEvent

=

param1

end

switch

gCons = cons.Param00;//read consuming Assembly member value

end function
//TASK 2
function run()

TRACE( "Start Task 2..." )

until( Task1.gEvent != 0 )//wait global variable

TRACE( "Task 2: Event %", Task1.gEvent )

prod.Param00=2//change produsing Assembly member value

end function

Advertising