28.11.2012 Views

Table of Contents - TG Drives

Table of Contents - TG Drives

Table of Contents - TG Drives

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

140<br />

LAN1, Local area network 1<br />

LAN1, DOUBLE BUFFERING<br />

EXTENDED REGISTER GROUPS<br />

The firmware uses a double buffering method to communicate between the CAN<br />

lower protocol and the PL interpreter. The Read and Write instructions are used for<br />

manipulating the buffers.<br />

LAN1, SPECIFIC INSTRUCTIONS<br />

SetObjLAN1<br />

GetObjLAN1<br />

ReadLAN1<br />

,<br />

,<br />

<br />

This instruction will map a previously defined<br />

MsgObjLan1 to a , priority level, in the<br />

CAN low protocol, thereby activating the<br />

content <strong>of</strong> the MsgObjLAN1 (make it alive).<br />

Lower numbers yield higher priority.<br />

A MsgObjLAN1 is mapped to a priority level.<br />

The number <strong>of</strong> usable priority levels depends<br />

on the setting <strong>of</strong> LANx.lowprot as:<br />

Standard = 8 priority levels.<br />

Extended = 15 priority levels where level 15<br />

has special possibilities.<br />

Note. Priority level 13, 14 and 15 are reserved<br />

for system usage and may not be available in<br />

future releases.<br />

It is possible to remap an already activated<br />

object, just issue a new SetObjLAN1<br />

instruction with the same priority level.<br />

Example:<br />

<br />

...<br />

MsgObjLAN1.Id, 1234<br />

MsgObjLAN1.Type = 1 ; receive<br />

MsgObjLAN1.....<br />

...<br />

SetObjLAN1 1<br />

The Message Object with the ID 1234 is made<br />

active and mapped to priority level 1.<br />

For each message object received with ID<br />

1234 the content will be stored in the buffer<br />

related to priority level 1.<br />

To read the content into a register, the<br />

following code should be executed:<br />

ReadLAN1 r45, 4, 1<br />

This code is typically put into a interrupt<br />

service routine.<br />

Here is how to deactivate a message object:<br />

MsgObjLAN1.Type = 0<br />

SetObjLAN1 1<br />

A previous defined Message Object is<br />

deactivated.<br />

Fill in the MsgObjLAN1 with the message object at<br />

.<br />

Read bytes and put in register from the<br />

buffer for message object at .<br />

Multiple reads after the initial first, can be done by<br />

User's Manual 5.1 Inmotion Technologies AB<br />

Doc. No.9032 0027 01 (B), Rev. 11.07.2001

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!