![background image](http://html1.mh-extra.com/html/icp-das-usa/isagraf-vp-23w7/isagraf-vp-23w7_user-manual_614285116.webp)
ISaGRAF WinCE ViewPAC User Manual , V.1.6 , 1/2017 by ICP DAS
6-8
6.4.2 Analog R/W Functions
■
UserSetReg_short
■
UserSetReg_long
■
UserSetReg_float
Description:
These functions are to set 16-bit short integer , 32-bit long integer & 32-bit float value to the specified
Modbus network address.
Syntax:
UserShare.UserSetReg_Short (ByVal
iUserAddress
As System.UInt16, ByRef
iStatus
As Integer) As
Byte
UserShare.UserSetReg_Long (ByVal
iUserAddress
As System.UInt16, ByRef
iStatus
As Integer) As
Byte
UserShare.UserSetReg_Float (ByVal
iUserAddress
As System.UInt16, ByRef
iStatus
As Single) As Byte
Parameter:
iUserAddress : Specify the Network Address of Variable (1 to 8191)
iStatus : Set the short or long integer or float value.
Example:
‘ Set a long value “1234567” to the variable of Modbus Network Address “1”.
UserShare.UserSetReg_long(Convert.ToUInt16(1), Convert.ToInt32(1234567) )
‘ Set a short value “-1234” to the variable of Modbus Network Address “3”.
UserShare.UserSetReg_short(Convert.ToUInt16(3), Convert.ToInt16(-1234) )
‘ Set a float value “2.174” to the variable of Modbus Network Address “4”.
UserShare.UserSetReg_float(Convert.ToUInt16(4), Convert.ToSingle(2.174) )
Demo program :
ISaGRAF WinCE ViewPAC CD-ROM:
\napdos\isagraf\vp-25w7-23w7\vb.net-2008-demo\wp_vb02 for R/W analog I/O
\napdos\isagraf\vp-25w7-23w7\vb.net-2008-demo\wp_vb03 for R/W internal long integer, Timer and
Real (floating-point) values.
Note
:
The long integer & timer & real variable’s Network Address No. must occupy 2 No. in the ISaGRAF
project. (refer to
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”)
Содержание ISaGRAF VP-23W7
Страница 44: ......
Страница 118: ......
Страница 134: ...ISaGRAF WinCE ViewPAC User Manual V 1 6 1 2017 by ICP DAS 9 2 On line help of ICP DAS add on functions function blocks ...
Страница 176: ...ISaGRAF WinCE ViewPAC User Manual V 1 6 1 2017 by ICP DAS Ap 16 Appendix C Hardware Interface Dimension ...
Страница 177: ...ISaGRAF WinCE ViewPAC User Manual V 1 6 1 2017 by ICP DAS Ap 17 VP 23W7 23W6 Unit mm ...
Страница 178: ...ISaGRAF WinCE ViewPAC User Manual V 1 6 1 2017 by ICP DAS Ap 18 VP 25W7 25W6 Unit mm ...
Страница 179: ...ISaGRAF WinCE ViewPAC User Manual V 1 6 1 2017 by ICP DAS Ap 19 ...
Страница 180: ...ISaGRAF WinCE ViewPAC User Manual V 1 6 1 2017 by ICP DAS Ap 20 VP 41x7 41x6 Unit mm ...
Страница 185: ...ISaGRAF WinCE ViewPAC User Manual V 1 6 1 2017 by ICP DAS Ap 25 ...