![background image](http://html1.mh-extra.com/html/icp-das-usa/isagraf-vp-23w7/isagraf-vp-23w7_user-manual_614285120.webp)
ISaGRAF WinCE ViewPAC User Manual , V.1.6 , 1/2017 by ICP DAS
7-2
Get boolean value
:
unsigned char UserGetCoil(unsigned short iUserAddress, unsigned char *iStatus);
iUserAddress:1 to 8191 (Variable’s network address in ISaGRAF project)
iStatus:
0: boolean is False, 1: boolean is True
for ex.
unsigned char bVal;
UserGetCoil(5 , &bVal) // get Boolean value at network addr 5
Get word or float or long value
:
unsigned char UserGetReg(unsigned short iUserAddress, long *iStatus,
unsigned char iDType);
iUserAddress:1 to 8191 (Variable’s network address in ISaGRAF project)
iStatus: A pointer to a long type, which stores the data returned
iDType
0: type is word
1: data type is float
2: data type is long (use long for Timer value in ISaGRAF, unit is ms)
for ex.
float float_val;
long word_val, long_val;
long ret_val;
// get word_val (-32768 to +32767) of ISaGRAF variable with network address 10
UserGetReg(10, &ret_val, 0);
if ( ret_val>=0 && ret_val<=32767 ) word_val = ret_val;
else word_val = ret_val | 0xFFFF0000;
// get float of ISaGRAF variable with network address 11
UserGetReg(11, &ret_val, 1) ;
float_val = *(float *) (&ret_val) ;
// get long of ISaGRAF variable with network address 13
UserGetReg(13, &ret_val, 2) ;
long_val = ret_val ;
Note
:
The long integer , timer and float variable’s Network Address No. must occupy 2 No. in the ISaGRAF
project.
(Please refer to
of “User’s Manual of ISaGRAF Embedded Controllers” or in the ISaGRAF
WinCE ViewPAC 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 ...