Communication protocols
PROGRAMMING MANUAL
168
Revi
si
on 3.0
After you have executed the command
PROFIBUS(unit_number,
2, ...)
, data arrays are automatically exchanged. The data
exchanged between the TJ1-PRT and the PROFIBUS master is in
16-bit integer format. Each word exchanged ranges from -32768 to
32767.
A VR variable can hold a 24-bit number, and it can also hold
fragments. The exchange with the PROFIBUS master does not
support values outside the range -32768..32767 and fragments.
An example sequence to configure the TJ1-PRT unit, is as follows:
1. Set the unit number with the two rotary switches of the TJ1-PRT
unit.
fig. 5
2. Switch on the power to the system. The
RUN
LED lights. The
ERH
LED flashes.
3. Create a BASIC Program containing the command
PROFIBUS(2,2,1,10,7,150,3)
. In this example the system
initializes a TJ1-PRT unit with unit number 2. The system sends
seven output words from the master to the VR’s 10 to 16 and
three input words from the VR’s 150 to 152 to the master.
4. If the configuration is successful, the
RUN
LED lights and the
COMM
LED lights. Communication is now active.
To configure the CJ1-PRM21 with the CX-PROFIBUS, do these
steps:
RUN
ERC
ERH
COM
BF
I52E-EN-03.book Seite 168 Freitag, 29. Juni 2007 11:55 11