41-553M.pdf - Pickering Interfaces
41-553M.pdf - Pickering Interfaces
41-553M.pdf - Pickering Interfaces
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
5. MULTI-TERMINAL SIMULATION<br />
The <strong>41</strong>-553 B and C versions can simultaneously simulate a bus controller<br />
and/or up to 32 remote terminals. The C version adds concurrent monitoring<br />
capability and error injection. This chapter demonstrates how to configure<br />
the <strong>41</strong>-553 to simulate multiple terminals.<br />
5.1 Simultaneous BC, RT and Monitor Simulation<br />
To simulate more than one terminal simultaneously with the <strong>41</strong>-553 you<br />
simply concatenate the configuration code for each terminal. The code in<br />
Fig. 5-1 illustrates this, combining terminal configurations similar to Examples<br />
2, 3 and 4 from Chapter 4. This example assumes a <strong>41</strong>-553 version C. If<br />
a B version is used the monitor function is not available simultaneously with<br />
RT and BC simulation.<br />
MSGADDR BCMsg, RTMsg;<br />
Card = L13_CardOpen(CARDNUM);<br />
L13_CardReset(Card);<br />
// Bus controller configuration from Example 2 (Fig. 4-3)<br />
L13_BCConfig(BCCFG_DEFAULT, Card);<br />
BCMsg = L13_BCCreateMsg(MSGCRT_DEFAULT, 0x0843, 0, &InitialData, Card);<br />
L13_BCSchedFrame(10000, Card);<br />
L13_BCSchedMsg(BCMsg, Card);<br />
// RT configuration from Example 3 (Fig. 4-4)<br />
L13_RTConfig(RTCFG_DEFAULT, 1, Card);<br />
RTMsg = L13_RTGetMsg(SUBADDRESS, 1, RCV, 2, Card);<br />
// Monitor configuration from Example 4 (Fig. 4-5)<br />
L13_MonConfig(MONCFG_DEFAULT, Card);<br />
L13_MonFilterTA(0x00000002, Card);<br />
L13_CardStart(Card);<br />
while( /* AS REQUIRED BY THE APPLICATION */ )<br />
{<br />
// Handle data as in Examples 2 through 4 in Chapter 4.<br />
}<br />
L13_CardStop(Card);<br />
L13_CardClose(Card);<br />
Fig. 5-1 Example 5: Multi-terminal simulation<br />
L13_CardOpen and L13_CardReset only need to be called once. Note<br />
that L13_CardReset is especially important in programs for multiterminal<br />
versions of the <strong>41</strong>-553. If L13_CardReset is omitted, terminal<br />
configurations from a previous program may be intact on the <strong>41</strong>-553. This<br />
could result in simulation of unintended terminals.<br />
<strong>41</strong>-553 User’s Manual 5-1