Emerson PMT1 Manuel D’Utilisation

Page de 128
Monitor:
 Standard Monitor Functions
PmT1 and PmE1 User’s Manual
10002367-02
8-42
The second parameter, Base, indicates the base address of the data structure to be oper-
ated on, and the Size parameter indicates the size of the data structure to be operated on. 
The Offset parameter specifies the byte offset in the nonvolatile memory device where the 
data structure is to be stored. An example of how to initialize, store, and recall the example 
data structure is shown below. 
NVOp(NV_OP_CLEAR, &NVEx, sizeof(NVEx), 0);
NVOp(NV_OP_SAVE , &NVEx, sizeof(NVEx), 0);
NVOp(NV_OP_OPEN , &NvEx, sizeof(NVEx), 0);
NVOp(NV_OP_FIX,   &NVEx, sizeof(NVEx), 0);
NVOp(NV_OP_SAVE , &NVEx, sizeof(NVEx), 0);
The clear, save, and open operations cause the nonvolatile device to be cleared and filled 
with the NVEx data structure; then the data structure is filled from nonvolatile memory. 
The fix and save operation are used to modify the nonvolatile device, which updates the 
internal data structures and then writes them back to the nonvolatile memory device. 
If errors are encountered during the check, save, or compare operations, an error message 
is returned from the function NVOp. The error codes are listed below:
Table 8-9:
NVOP Error Codes
See also:
NVFields.h.
Seed
Seed(Value)
unsigned long Value;
Description:
The Seed function sets the initial value for the random number generator command rand.
Serial
char get_c()
char get_d()
put_c(char ch)
put_d(char ch)
baud_c(Baud)
Error:
Number:
Description:
NVE_NONE
0
No errors
NVE_OVERFLOW
1
Nonvolatile device write count exceeded
NVE_MAGIC
2
Bad magic number read from nonvolatile device
NVE_CKSUM
3
Bad checksum read from nonvolatile device
NVE_STORE
4
Write to nonvolatile device failed
NVE_CMD
5
Unknown operation requested
NVE_CMP
6
Data does not compare to nonvolatile device