Table of Contents - TG Drives
Table of Contents - TG Drives
Table of Contents - TG Drives
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
EXTENDED REGISTER GROUPS<br />
WriteLAN1<br />
SendObjLAN1<br />
IReturnCAS1<br />
LAN1, Local area network 1<br />
specifying - .<br />
An internal <strong>of</strong>fset is maintained that allows a user to pack<br />
the data in the 8 available bytes in a message.<br />
Example:<br />
Read LAN1 R5, 4, 1<br />
; Read 4 bytes <strong>of</strong> data into register R5<br />
from level #1<br />
Read LAN1 R6, 1, -1<br />
; Read the fifth byte into register R6<br />
Read LAN1 R7, 2, -1<br />
; Read two bytes beginning at the sixth<br />
byte into register R7<br />
...<br />
CAUTION:<br />
Lan1 interrupt routines, automatically disables other Lan1<br />
interrupts until the Ireturn statement is executed. To enable<br />
another Lan1 interrupt the corresponding bit in Int.sysmask has<br />
to be set.<br />
,<br />
,<br />
<br />
Write bytes to the buffer for message object at<br />
from register .<br />
Multiple writes, after the initial first, can be done by<br />
specifying - . See ReadLAN1.<br />
Send the buffer content for the message object at<br />
on to the CAN bus. The data size sent will be<br />
the length that was previously defined when the object<br />
was defined. If the len member <strong>of</strong> the MsgObjLAN1<br />
was zero when the SetObjLAN1 instruction<br />
was<br />
executed then a message object with no data will be<br />
transmitted. The content <strong>of</strong> the data should be filled in<br />
using the WriteLAN1 instruction prior to this<br />
instruction.<br />
<br />
LAN1, REMOTE FRAMES IN CAN<br />
A return from a user written PL interrupt service<br />
routine should end with this instruction. It will behave<br />
as the normal IReturn, but affect the individual<br />
message object interrupts. The <br />
value is binary added (OR) to LAN1.Mask.<br />
The Int.SysMask is automatically re-enabled.<br />
The CAN ’Remote Frame’ concept is implemented in hardware by the low-level<br />
communication protocol. The name <strong>of</strong> this mechanism, ’Remote Frame’, is<br />
unfortunate it would have been better with ’Respond Frame’, because the receiver<br />
<strong>of</strong> a ’Remote Frame’ shall respond with it’s contents. The receiver here is the<br />
transmit descriptor that owns the requested data and the sender is a receive<br />
descriptor that wants this data.<br />
To generate a ’Remote Frame’ in PL a user can send, use the instruction<br />
SendObjLAN1, on a descriptor that was defined as a receive type. The low level<br />
communication protocol will in this case send a CAN ’Remote Frame’ so that<br />
somewhere on the net a transmit object with the same ID will respond and send<br />
the content <strong>of</strong> its descriptor.<br />
User's Manual 5.1 Inmotion Technologies AB<br />
Doc. No.9032 0027 01 (B), Rev. 11.07.2001<br />
141