3 test and demonstration source files, 4 multitasking in your application – Schneider Electric Modbus Plus Network Bridge Multiplexer none User Manual
Page 71

Configuring the Programmable Models
31007492
61
4.3.3
Test and Demonstration Source Files
The following files provide source code examples that you can use in
your development. They can also be modified and used as test programs
for exercising and testing your BM85.
File Name
Purpose
TEST0.C
Displays a code on the BM85 LED indicators
TEST1.C
Shows Modbus Plus master and slave operation
TEST2.C
Demonstrates multitasking using the BM85 indicators
TEST3.C
Demonstrates floating point emulator
TEST4.C
Simulates process control with multitasking, C++ conventions
TEST5.C
Same as TEST4.C, but uses C conventions
TEST6.C
RS232 port loopback test
TEST7.C
RS232/RS485 port loopback test, long term
TEST8.C
Sample large program (240K) for download testing
Using the Test and Demonstration Source Files
To use any file, first copy it to the filename BM85.C, then modify that
file for your BM85 application and compile it. Download the executable
BM85.EXE to the BM85 using the BM85LOAD utility. For example, the
download can be run within the Borland 3.1 environment using the
following sequence:
Key Sequence
Purpose
Alt–space
Transfer menu
m
BM85 download
4.3.4
Multitasking in Your Application
The BM85 library includes functions that you can use to construct a
routine for assigning and controlling multiple tasks or threads within
your application. Multitasking is handled on a cooperative basis: an
active task routine must make periodic calls to an arbitration routine,
allowing that routine to either continue the calling task or handle
another pending task.
Your demonstration programs TEST4.C and TEST5.C provide source
examples of the use of the library's multitasking functions. TEST4.C is
coded in C++. TEST5.C is coded in C for programmers who are more
familiar with that language.