Rockwell-automation Logix5000 Controllers Produced and Consumed Tags P Uživatelský manuál Strana 32

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 40
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 31
Chapter 2 Produce a Large Array
In addition, the array must contain an extra 122 elements. In other words, it must
be 122 elements greater than the greatest number of elements that you want to
transfer.
These elements serve as a buffer.
Because each packet contains the same number of elements, the buffer
prevents the controller from copying beyond the boundaries of the array.
Without the buffer, this would occur if the last packet contained fewer than
123 elements of actual data.
Follow these steps to produce a large array.
1. In the Controller Tags folder of the controller project that produces the
array, create these tags.
P Tag Name Type
array_ack DINT[2]
X
array_packet DINT[125]
2. Convert array_ack to a consumed tag.
For Specify
Controller Name of the controller that is receiving the packet.
Remote Tag Name array_ack
Both controllers use the same name for this data.
3. In either the Controller Tags folder or the tags folder of the program that
will contain the logic for the transfer, create these tags.
Tag Name Type
array DINT[x] where x equals the number of elements to transfer plus
122 elements
array_offset DINT
array_size DINT
array_transfer_time DINT
array_transfer_time_max DINT
array_transfer_timer TIMER
4. In the array_size tag, enter the number of elements of real data.
The value of x from step 3 minus the 122 elements of buffer.
5. Create or open a routine for the logic that creates packets of data.
Produce a large array
32 Rockwell Automation Publication 1756-PM011F-EN-P - October 2014
Zobrazit stránku 31
1 2 ... 27 28 29 30 31 32 33 34 35 36 37 38 39 40

Komentáře k této Příručce

Žádné komentáře