Publication LOGIX-AP007B-EN-P - January 2007
CompactFlash Commands
19
Delete Command
Use the Delete command when a file needs to be deleted from the
CompactFlash card. A file must exist on the CompactFlash card before you
can use the Delete command.
The delete command consists of two commands:
•
Delete the file.
•
Error Handling is performed, if needed.
Set Up the Delete Command
To set up the Delete command:
•
define a filename including a file extension, for example, testfile1.dat.
•
set the bit execute_CF_Delete_File. The application code handles
resetting this bit.
Refer to Chapter 4, Example Application for complete instructions.
Determine the Number of
Bytes to Read or Write
Tags of any data type, including arrays, user-defined types (UDT), and arrays
of UDT tags can be read and written to the CompactFlash card.
When reading and writing data to the CompactFlash card, you need to know
how many bytes are actually being read or written. The following chart
indicates the type and size of the atomic data types. The minimum memory
allocation for a tag is 4 bytes. When you create a tag that stores data that
requires less than four bytes, the controller allocates four bytes, but the data
only fills the part it needs.
For example, if one DINT type tag value is being written to the CompactFlash
card, 4 bytes is the amount of data that will be written. If an array of DINT
tags is being written, the number of bytes being written will be 4 times the size
of the array.
Data Type
Bits
31
16 15
8 7
1
0
BOOL
Not used
0 or 1
SINT
Not used
-128
…
+127
INT
Not used
-32,768
…
+32767
DINT
-2,147,483,648
…
+2,147,483,647
REAL
-3.40282347E
38
…
-1.17549435E
-38
(negative values)
0
1.17549435E
-38
…
3.40282347E
38
(positive values)
Содержание controllogix 1756-L61
Страница 6: ...Publication LOGIX AP007B EN P January 2007 6 Notes...
Страница 10: ...Publication LOGIX AP007B EN P January 2007 10 CompactFlash Card Enhancements Overview Notes...
Страница 42: ...Publication LOGIX AP007B EN P January 2007 42 Format a CompactFlash Card Notes...
Страница 48: ...Publication LOGIX AP007B EN P January 2007 48 Troubleshoot the CompactFlash File System Notes...
Страница 52: ...Publication LOGIX AP007B EN P January 2007 52 Expand the Code to Support More than 4500 Bytes of Data Notes...
Страница 55: ......