![background image](http://html1.mh-extra.com/html/icp-das-usa/isagraf-vp-23w7/isagraf-vp-23w7_user-manual_614285155.webp)
ISaGRAF WinCE ViewPAC User Manual , V.1.6 , 1/2017 by ICP DAS
10-7
10.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(ushort iUserAddress, out int iStatus)
UserShare.UserSetReg_Long(ushort iUserAddress, out int iStatus)
UserShare.UserSetReg_Float(ushort iUserAddress, out float iStatus)
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”.
int temp1=1234567;
UserShare.UserSetReg_long(Convert.ToUInt16(1), out temp );
// Set a short value “-1234” to the variable of Modbus Network Address “3”.
int temp2= -1234;
UserShare.UserSetReg_short(Convert.ToUInt16(3), out temp2 );
// Set a float value “2.174” to the variable of Modbus Network Address “4”.
float temp3=2.174;
UserShare.UserSetReg_float(Convert.ToUInt16(4), out temp3 );
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 & real 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”)
Содержание 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 ...