ISaGRAF WinCE ViewPAC User Manual , V.1.6 , 1/2017 by ICP DAS
10-8
■
UserGetReg_short
■
UserGetReg_long
■
UserGetReg_float
Description:
These functions are to get 16-bit short integer , 32-bit long integer & 32-bit float value from the
specified Modbus network address.
Syntax:
UserShare.UserGetReg_Short(ushort iUserAddress, out int iStatus)
UserShare.UserGetReg_Long(ushort iUserAddress, out int iStatus)
UserShare.UserGetReg_Float(ushort iUserAddress, out float iStatus)
Parameter:
iUserAddress : Specify the Network Address of Variable (1 to 8191)
iStatus : Get the short or long integer or float value.
Example:
float float_val
short short_val
int long_val
// Get float value of the variable of Modbus Network Address “7”.
UserShare.UserGetReg_float(Convert.ToUInt16(7),out float_val);
// Get long value of the variable of Modbus Network Address “9”.
UserShare.UserGetReg_long(Convert.ToUInt16(9),out long_val);
// Get short value of the variable of Modbus Network Address “11”.
UserShare.UserGetReg_short(Convert.ToUInt16(11),out short_val) ;
Demo program :
ISaGRAF WinCE ViewPAC CD-ROM:
\napdos\isagraf\vp-25w7-23w7\CSharp.net-2008-demo\wp_CSharp02 for R/W analog I/O
\napdos\isagraf\vp-25w7-23w7\CSharp.net-2008-demo\wp_CSharp03 for R/W internal Boolean ,long
integer, Timer and Real (floating-point) values.
Note
:
The long integer & timer & float variable’s Network Address No. must occupy 2 No. in the ISaGRAF
project. (refer to section 4.2 of “User’s Manual of ISaGRAF Embedded Controllers” or in the CD-ROM:
\napdos\isagraf\vp-25w7-23w7\english-manu\” User_Manual_I_8xx7.pdf”)
Summary of Contents for ISaGRAF WinCE ViewPAC
Page 44: ......
Page 118: ......
Page 177: ...ISaGRAF WinCE ViewPAC User Manual V 1 6 1 2017 by ICP DAS Ap 17 VP 23W7 23W6 Unit mm...
Page 178: ...ISaGRAF WinCE ViewPAC User Manual V 1 6 1 2017 by ICP DAS Ap 18 VP 25W7 25W6 Unit mm...
Page 179: ...ISaGRAF WinCE ViewPAC User Manual V 1 6 1 2017 by ICP DAS Ap 19...
Page 180: ...ISaGRAF WinCE ViewPAC User Manual V 1 6 1 2017 by ICP DAS Ap 20 VP 41x7 41x6 Unit mm...
Page 185: ...ISaGRAF WinCE ViewPAC User Manual V 1 6 1 2017 by ICP DAS Ap 25...