Mitsubishi Electronics SW2D5C-GTWK2-E Frozen Dessert Maker User Manual


 
7.3 Internal Device Interface Function
7.3.2 GDev_Read (Reading from the internal device)
7 - 5
1
OVERVIEW
2
SYSTEM
CONFIGURATION
3
SPECIFICATIONS
4
SCREEN
CONFIGURATION
5
OPERATING
METHOD
6
FUNCTIONS
7
INTERNAL DEVICE
INTERFACE
FUNCTION
8
TROUBLESHOOTING
APPENDICES
7.3.2 GDev_Read (Reading from the internal device)
The following shows details of the GDev_Read function.
(1) Function
Reads from the GOT internal device.
(2) Format
(a) For Visual C++
lReturn = GDev_Read(ulMapPointer, sDevNameID, lDevNum, *lpsDataTable, lDataSize)
(b) For Visual Basic
lReturn = GDev_Read(ulMapPointer, sDevNameID, lDevNum, sDataTable(0), lDataSize)
(3) Explanation
The device values in the area starting from the device specified by sDevNameID and lDevNum are
batch read for the number specified by IDataSize to the shared memory address specified by
ulMapPointer.
The read device values are stored to lpsDataTable or sDataTable.
Specify the shared memory address that has been obtained by the GDev_OpenMapping function.
(4) Return value
Normal termination: "0" is returned.
Abnormal termination: A number other than "0" is returned.
(5) Precautions for using the GDev_Read function
The maximum number of data points to be read, that is set for IDataSize, must be specified in the
following range.
For bit device (GB) specification
Device number + (Number of data points to be read 16)-1 Terminal device number
For word device (GD/GS) specification
Device number + Number of data points to be read-1 Terminal device number
In the case of bit device (GB) specification, specify a multiple of 16 for the device number.
Secure the area for lpsDataTable with the same size as lDataSize or more.
If the area is insufficient, an error such as application error may occur.
Variable name Variable type Description I/O
lReturn long Return value Output
ulMapPointer unsigned long Shared memory address Input
sDevNameID short Device name ID (GB:0/GD:1/GS:2) Input
lDevNum long Device number Input
*lpsDataTable short Device value read Output
lDataSize long Number of data points to be read Input
Variable name Variable type Description I/O
lReturn long Return value Output
ulMapPointer unsigned long Shared memory address Input
sDevNameID short Device name ID (GB:0/GD:1/GS:2) Input
lDevNum long Device number Input
sDataTable(n) short Device value read Output
lDataSize long Number of data points to be read Input