7.3 Internal Device Interface Function
7.3.3 GDev_Write (Writing to the internal device)
7 - 7
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.3 GDev_Write (Writing to the internal device)
The following shows details of the GDev_Write function.
(1) Function
Writes to the GOT internal device.
(2) Format
(a) For Visual C++
lReturn = GDev_Write(ulMapPointer, sDevNameID, lDevNum, *lpsDataTable, lDataSize)
(b) For Visual Basic
lReturn = GDev_Read(ulMapPointer, sDevNameID, lDevNum, sDataTable(0), lDataSize)
(3) Explanation
The device values are batch written to the devices specified by sDevNameID and lDevNum for the
shared memory address specified by ulMapPointer for the number specified by lDataSize.
The device values to be written 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_Write function
The maximum number of data points to be written, that is set for lDataSize, must be specified in the
following range.
• For bit device (GB) specification
Device number + (Number of data points to be written 16)-1 Terminal device number
• For word device (GD/GS) specification
Device number + Number of data points to be written-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 to be written Input
lDataSize long Number of data points to be written 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 to be written Input
lDataSize long Number of data points to be written Input