49
Publication LOGIX-AP007B-EN-P - January 2007
Appendix
D
Expand the Code to Support More than 4500
Bytes of Data
Introduction
This appendix describes how to expand the code to support more than 4500
bytes of data.
Modify the Application to
Access More Data
The baseline application supports reading or writing 4500 bytes of data to
CompactFlash card. If you need to access more data, modify the baseline
application.
For example, you might have three groups of data that you want to write to the
CompactFlash card. One group will be 250 bytes, one will be 3000 bytes, and
the last will be 10,000 bytes. The first two will not warrant any changes to the
baseline application, but the last will. You will need to expand three tag’s array
sizes.
Before writing to the CompactFlash card, calculate how big to make those
three arrays. Do not increase them to 10,000 bytes. Be sure to take into
consideration that of the 450 bytes, 8 bytes are checksum information, leaving
442 bytes for user data.
Step 1:
Actual_Bytes_to_RW = Bytes (TRN (Bytes_to_RW/442) * 8) + (If
the MOD (Bytes_to_RW/442) > 0 then 8 else 0)
Step 2:
450 [TRN(Actual_Bytes_to_RW/450) +(if the MOD (Actual_Bytes_to_RW)
> 0 then 1 else 0]
Topic
Page
Summary of Contents for controllogix 1756-L61
Page 6: ...Publication LOGIX AP007B EN P January 2007 6 Notes...
Page 10: ...Publication LOGIX AP007B EN P January 2007 10 CompactFlash Card Enhancements Overview Notes...
Page 42: ...Publication LOGIX AP007B EN P January 2007 42 Format a CompactFlash Card Notes...
Page 48: ...Publication LOGIX AP007B EN P January 2007 48 Troubleshoot the CompactFlash File System Notes...
Page 55: ......