Table of Contents - TG Drives
Table of Contents - TG Drives
Table of Contents - TG Drives
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
EXTENDED REGISTER GROUPS<br />
SAnyBus<br />
; Copy return data<br />
anybusout getlong rTmp91,0 ;read byte 0 - 3 into reg<br />
anybusout getint rTmp92,4 ;read byte 4 - 5 into reg<br />
anybusout getbyte rTmp93,6 ;read byte 6 into reg<br />
anybusin putlong rTmp91,0 ;write back first long<br />
AnybusIO Send ;send it back<br />
isrPr<strong>of</strong>ibus00:<br />
if SAnybus.HasMail = 0 then isrPr<strong>of</strong>ibus10<br />
; We handle this in code. But we show it here anyway.<br />
; disp SAnybus.HasMail<br />
isrPr<strong>of</strong>ibus10:<br />
if SAnybus.OnLine = rOnLine then isrPr<strong>of</strong>ibus20<br />
; disp SAnybus.OnLine<br />
rOnLine, SAnybus.OnLine<br />
isrPr<strong>of</strong>ibus20:<br />
ireturn sys 4096<br />
;<br />
; START_INIT<br />
;<br />
SendStartInit<br />
: rProtNumber, cSTART_INIT<br />
SAnybus.Command, 1 ; Prepare START_INIT mail message<br />
wait SAnybus.Command = 0 ; Wait for it to be done<br />
SAnybus.Command, 7 ; Send to fieldbus module<br />
wait SAnybus.HasMail = 1 ; Wait for response mail<br />
; Investigate response mail for errors here<br />
if ABOutMail.MessageInfo < 0 then ErrorProt<br />
SAnybus.HasMail, 0<br />
return<br />
; Clear mailbox flag<br />
SendInit64_64:<br />
rProtNumber, cANYBUS_INIT<br />
SAnybus.Command, 3 ; Prepare ANYBUS_INIT mail message<br />
wait SAnybus.Command = 0 ; Wait for it to be done<br />
; Modify default values here in ABInMail<br />
; Length in bytes!<br />
;<br />
PBIn.InIOLen, 64<br />
PBIn.InDPRAMLen, 64<br />
PBIn.InTotalLen, 64<br />
PBIn.OutIOLen, 64<br />
PBIn.OutDPRAMLen, 64<br />
PBIn.OutTotalLen, 64<br />
ABInMail.ModuleStatus, 512+2 ; default value (you must keep 512)<br />
User's Manual 5.1 Inmotion Technologies AB<br />
Doc. No.9032 0027 01 (B), Rev. 11.07.2001<br />
181