MUST HAVE SHOULD HAVE COULD HAVE Module # 120. Communicating with a Host Controller Will know:...

24
MUST HAVE SHOULD HAVE COULD HAVE Module # 120

Transcript of MUST HAVE SHOULD HAVE COULD HAVE Module # 120. Communicating with a Host Controller Will know:...

Page 1: MUST HAVE SHOULD HAVE COULD HAVE Module # 120. Communicating with a Host Controller Will know: Supported communications Sequence of events when talking.

MUSTHAVE

SHOULD

HAVE

COULDHAVE

Module # 120

Page 2: MUST HAVE SHOULD HAVE COULD HAVE Module # 120. Communicating with a Host Controller Will know: Supported communications Sequence of events when talking.

Communicating with a Host Controller

• Will know:• Supported communications• Sequence of events when talking to a Qi Matroller• Tools available to simplify the process

Page 3: MUST HAVE SHOULD HAVE COULD HAVE Module # 120. Communicating with a Host Controller Will know: Supported communications Sequence of events when talking.

Ethernet TCP/IP

Fieldbus

1

Batch

Control

Software

PAM &

CPM

Services

Measurement

Devices

Scales

& Flowmeters

FBM

Page 4: MUST HAVE SHOULD HAVE COULD HAVE Module # 120. Communicating with a Host Controller Will know: Supported communications Sequence of events when talking.

Qi Host, Communications

• ControlNet– Scheduled (All Channel data)

– Unscheduled (Commands to QiMPACT)

• EthernetIP– ControlNet over Ethernet

– Unscheduled only• Uses same ControlNet board

– NOTE: Must be enabled, as ControlNet is default setting

• ProfiBus– Scheduled only

• Honeywell C200 – same as ControlNet– Scheduled (All Channel data)

– Unscheduled (Commands to QiMPACT)

• DeltaV– EthernetIP, (also has a ProfibusDP interface)

Page 5: MUST HAVE SHOULD HAVE COULD HAVE Module # 120. Communicating with a Host Controller Will know: Supported communications Sequence of events when talking.

ControlNet

• ControlNet– Two type of communications

• Scheduled (Cyclic)• Unscheduled

• Ethernet IP– Unscheduled only

Page 6: MUST HAVE SHOULD HAVE COULD HAVE Module # 120. Communicating with a Host Controller Will know: Supported communications Sequence of events when talking.

A Qi Cluster (single PAC database throughout)

• 1 x ControlNet network• 2 x Qi “Bridge”• 1 x Qi “Master”• 3 x Qi “Remote”• 28 x Channels ( 1 to 28 )

– 22 x Assembly Slots (1 to22), bridge 1– 6 x Assembly Slots (1 to 6), bridge 2

• 1 x Ethernet TCP/IP network

CNet

2x Scale

4x FlowM

4x FlowM4x FlowM4x FlowM

Ethernet Hub

Term 1

Term 2

Term 32x Scale2x Scale

2x Scale

4x FlowMTerm 4

Page 7: MUST HAVE SHOULD HAVE COULD HAVE Module # 120. Communicating with a Host Controller Will know: Supported communications Sequence of events when talking.

A Qi Cluster (single database throughout)

• 2 x Qi “Bridge”• 1 x Qi “Master”• 3 x Qi “Remote”• 28 x Channels ( 1 to 28 )

– 22 x Assembly Slots (1 to22), bridge 1– 6 x Assembly Slots (1 to 6), bridge 2

• 1 x Ethernet TCP/IP network• Ethernet IP between the PLC and

QiMPACT • NOTE: ControlNet board is required!

2x Scale

4x FlowM

4x FlowM4x FlowM4x FlowM

Ethernet Hub

# 1

# 32x Scale2x Scale

2x Scale

4x FlowM

# 4

Ethernet IP

# 2

Page 8: MUST HAVE SHOULD HAVE COULD HAVE Module # 120. Communicating with a Host Controller Will know: Supported communications Sequence of events when talking.

Scheduled CNet comms (cyclic)

System info (8 wrds)

Assy Slot 1 (10 wrds)

Assy Slot 2 (10 words)

Assy Slot 3 (10 words)

Assy Slot 24 (10 words)

248 words retrieved by PLC per Qi bridge

Cyclic Data Flow

Cyclic data block

Qi Bridge and remotes

CNet

Bridge

Remote

Remote

Note: Channel data is not fixed to an Assembly Slot !!

Page 9: MUST HAVE SHOULD HAVE COULD HAVE Module # 120. Communicating with a Host Controller Will know: Supported communications Sequence of events when talking.

Scheduled CNet comms (content)

• Values– Channel– Gross Weight– Feed Weight– Flow rate– Time to complete– Slow step timer

• Status bits– Alternating bit– Channel OK!– Scale under zero– Scale in motion– Transfer active– Control O/P ON (FCE)– Feed Failed– Comms error– Waiting for Ack

For the detailed content see document Cmds&Stat.doc

Page 10: MUST HAVE SHOULD HAVE COULD HAVE Module # 120. Communicating with a Host Controller Will know: Supported communications Sequence of events when talking.

Unscheduled – Typ. command sequence

• Command to Start Transfer sent to Qi

• Pause

• Read and confirm command has been actioned

• Some Status responses:– 0 to 5 = command success– 6 processing command – retry– 9 invalid command

• Range is 0 to 34

Start Mat Transfer command

Pause

Read status back

Page 11: MUST HAVE SHOULD HAVE COULD HAVE Module # 120. Communicating with a Host Controller Will know: Supported communications Sequence of events when talking.

Unscheduled Cnet comms (Commands)

• Used to send commands to Qi• Ie

– Start Material Transfer:• Channel #• Sequence #• Material path• Command number :

– 1 for “Start Material Transfer”– 4 for “Ack Material Transfer Complete”

• Target Weight and Tolerance• User defined text string

• Used to read data from the QiMPACT – Ie the result of the Command just sent

• Used Access any other data (shared data)

Page 12: MUST HAVE SHOULD HAVE COULD HAVE Module # 120. Communicating with a Host Controller Will know: Supported communications Sequence of events when talking.

Host Controller Integration – some tips Pg. 1 of 3extracted from: “Qi_Integration - Best Practices.doc”

• Qi Ready to Start ?– There are aprox 8 bits available to the controller via the cyclic data which

should be examined to determine whether the Qi is in a state to accept a new “Feed Command”. These should be evaluated!

• Time interval between sending commands to the Qi Matroller – The time that the Qi takes to evaluate and act on a command varies from 60

mS to 300 mS. Factors which influence the response time are whether it is a local or remote channel or a scale or flow meter based feed (scale is faster) Be sure to evaluate command response code “6” if sending commands in less than 300 mS

• Matching the Command sent with the Response read – A mechanism exists whereby it is possible to make sure that the command

response that you have just read is the latest response or the previous commands response (ie old data). Essentially, some of the “Sent” data is echoed in the “Response” data. You MUST compare and match these fields correctly!

! “Best Practices” when integrating with a Qi Matroller !

Page 13: MUST HAVE SHOULD HAVE COULD HAVE Module # 120. Communicating with a Host Controller Will know: Supported communications Sequence of events when talking.

Host Controller Integration – some tips Pg. 2 of 3extracted from: “Qi_Integration - Best Practices.doc”

• Getting out of Synchronization (Lockstep) – Your application should be structured so that a command can be edited and

repeated. This is required in the case of an invalid command being sent which is then rejected by the Qi. The Qi will then be ready to accept another (valid) command.

• Are we in Control ??– The Qi Matroller is an autonomous device. And like all such devices which

act independently, they should be monitored constantly to ensure that they are functioning correctly. There are a number of parameters which MUST be monitored contantly. If any of these are not in their “normal” state then the feed should be stopped immediately. Refer to above mentioned doc for details

• Stopping Feeds– It is essential that a PLC controlled relay contact is in series with each of the

Qi FCE O/P’s, even flow meter based feeds. This allows the PLC to be in “ultimate control” should their be a catastrophic failure of the Qi.

! “Best Practices” when integrating with a Qi Matroller !

Page 14: MUST HAVE SHOULD HAVE COULD HAVE Module # 120. Communicating with a Host Controller Will know: Supported communications Sequence of events when talking.

Host Controller Integration – some tips Pg. 3 of 3extracted from: “Qi_Integration - Best Practices.doc”

• Selecting an Ethernet Switch– Mettler-Toledo recommends that any Ethernet switch selected for use within a

Q.i Matroller cluster should be capable of having its ports manually set to operate in the following mode:

– 10 Mbits/second, HALF-Duplex, NO AUTO-NEGOTIATE. – Some switches set to the AUTO-NEGOTIATE mode have been found to

incorrectly select FULL-DUPLEX for the port setting if the negotiation process fails. This can lead to unreliable communications between the terminal and other devices

Page 15: MUST HAVE SHOULD HAVE COULD HAVE Module # 120. Communicating with a Host Controller Will know: Supported communications Sequence of events when talking.

Command & message sequence

• Recipe resides in SCADA

• PLC will initiate sequence

• PLC retrieves Recipe or next ingredient

• PLC composes message and sends StarFeed command to QiMPACT

• QiMPACT takes control of the Feed

• QiMPACT completes the feed

• QiMPACT reports end of feed data to PLC

CNet

2x Scale

4x FlowM

SCADA

PLC

PLC reports to Scada Next sequence will start High Speed control done

entirely by the QiMPACT

Page 16: MUST HAVE SHOULD HAVE COULD HAVE Module # 120. Communicating with a Host Controller Will know: Supported communications Sequence of events when talking.

Tools to Simplify the Integration process

• AIM – (Application Interface Module)• AIM Explorer• AIM Simulator

– Note: Explorer and Simulator are one item.

• These tools currently only exist for some Allen Bradley products

• Read and take special note of: Qi_Integration - Best Practices.doc

• Other “must have docs” for integrators:– Apc_mesg.doc (covers comms structure)

– Sharedat.doc (list of all accessible shared data variables)

• Documents available for FTP transfer from:– ftp://ftp.usa.mt.com/pub/indmkg/Qi - LOOK HERE!/

Page 17: MUST HAVE SHOULD HAVE COULD HAVE Module # 120. Communicating with a Host Controller Will know: Supported communications Sequence of events when talking.

The AIM • AIM is PLC code • AIM takes care of low level comms to the Qi MAtroller• User application talks to the AIM and not directly to the Qi• The AIM is optional but recommended• The Aim is purchased separately

UserPLCCode

AIM

PLC program

Page 18: MUST HAVE SHOULD HAVE COULD HAVE Module # 120. Communicating with a Host Controller Will know: Supported communications Sequence of events when talking.

The AIM in detail• The AIM is scaleable• Will work with the largest Cluster

TargetMP

StartFinishedTarget

MPStart

Finished

ScA

ScB

TargetMP

StartFinishedTarget

MPStart

Finished

ScC

Flw1

US

ER

AP

PLI

CA

TIO

N

The “AIM”

Aim scans all channel dataRegister Array

Page 19: MUST HAVE SHOULD HAVE COULD HAVE Module # 120. Communicating with a Host Controller Will know: Supported communications Sequence of events when talking.

AIM Explorer and Simulator

• AIMse – is a PC based application– Upload/download of AIM configurations to/from PLC– Logging of AIM data values to PC

• Available in Standard and Professional versions– Professional offers simulation capability– Reference: AP01.BR04 AIMse.pdf for a more detailed description

• Explorer is used to configure the AIM in the PLC– Setup number of channels and various parameters associated with these

intruments and timers.

• Simulator is used to simulate a Qi for design and development purposes– AIM is switched to simulation mode– Simulator places data into the input buffers of the AIM in the PLC– User Application now thinks that there are Qi Matrollers connected– Simulator uses RSLinx to communicate with the AIM’s data registers over

EthernetTCP/IP

• Reference: AP01.BR04 AIMse.pdf for a more detailed description

Page 20: MUST HAVE SHOULD HAVE COULD HAVE Module # 120. Communicating with a Host Controller Will know: Supported communications Sequence of events when talking.

AIMse

Application

AIMseRsLinx

I/P B

uffer

AIM CNet

Normal &Simulation

• Switch between comms to Qi or AIMse

• AIMse will simulate Qi behavior

Ethernet

Page 21: MUST HAVE SHOULD HAVE COULD HAVE Module # 120. Communicating with a Host Controller Will know: Supported communications Sequence of events when talking.

AIMse Screen captures

Page 22: MUST HAVE SHOULD HAVE COULD HAVE Module # 120. Communicating with a Host Controller Will know: Supported communications Sequence of events when talking.

Review Questions

• The commmunications between the PLC and The Qi is:– a) Parallel

– b) Serial

• What is the purpose of the AIM• Must the AIM always be used

Page 23: MUST HAVE SHOULD HAVE COULD HAVE Module # 120. Communicating with a Host Controller Will know: Supported communications Sequence of events when talking.

Ethernet IP commsEthernet IP comms

• Only Unscheduled comms only• Sending commands and reading data identical to CNET

– Note: MSG addressing is different

• The scheduled cyclic data accessed by using an unscheduled message read to the relevant address

• This read command must be set to run every 500 to 1000ms• The content and structure of the message blocks is the same as

with CNet

Page 24: MUST HAVE SHOULD HAVE COULD HAVE Module # 120. Communicating with a Host Controller Will know: Supported communications Sequence of events when talking.

120T - Revision notes

• ControlNet is enabled by default

• EthernetIP must be enabled and its IP and subnet mask entered.

• Qi does not support DHCP

• The Assembly slot is the Channels indexed position in the Cyclic data to the host controller. (Assembly slot number is found on the Channel config page)

• After sending a Command always read the Command Status.

• The Command Status MUST ALWAYS be made available to the operators, especially when the Status value is > than 5.

• The AIM is optional code which simplifies interfacing to the Qi Matroller

• The AIMse can be used to simulate a large cluster of Qi’s

• Commands must be sent sequentially to the Qi.

• If a Channel is busy feeding you cannot send another command to that channel

• Monitor channels toggle bit, if it stops toggling disable material feeds

• Monitor channelOK status bit, if it turn Off, disable feed and abort any feeds using this channel