ISaGRAF WinCE ViewPAC User Manual , V.1.6 , 1/2017 by ICP DAS
7-1
Chapter 7
EVC++ Program Access To ISaGRAF Variables
Important Notice:
Please store your application programs and data files in the \Micro_SD . Don't store them
in the \System_disk.
That is because the \System_Disk is using Nor Flash memory. Its size is
small and major purpose is for storing OS, ISaGRAF driver, some basic utilities and DLL . The
Nor Flash memory is not good for frequently updating files. If update files frequently in the
\System_Disk (for example, update a file every 1 to 5 seconds, then it will be about ten thousand
more updates in one day), the data or files in the \System_disk may crush or lost for some days
or months later.
User can write his EVC++ 4.0 application to access to the ISaGRAF variables running at the same
VP-2xW7/4xx7 by using the below functions for Read/Write Boolean, word, long and float value.
The include file and library at design time are “WinConAgent.h” and “Quicker.lib”. (ISaGRAF WinCE
ViewPAC CD-ROM: \napdos\isagraf\vp-25w7-23w7\evc++-lib\ ). The DLL at run time is the “Quicker.dll”
which is in ViewPAC's \System_Disk\isagraf\ (Please copy the execution file after successfully
compilation to the ViewPAC 's \System_Disk\isagraf\ and then run it.)
Set boolean value
:
unsigned char UserSetCoil(unsigned short iUserAddress, unsigned char iStatus);
iUserAddress:1 to 8191 (Variable’s network address in ISaGRAF project)
iStatus:
0: set boolean to False, 1: set boolean to True
for ex.
UserSetCoil(100 , 1) // set Boolean at network addr 100 as True
Set word or float or long value
:
unsigned char UserSetReg(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 to set
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 *temp_val;
// set word_val (-32768 to +32767) to ISaGRAF variable with network address 1
word_val = -20000 ;
temp_val = (long *)(&word_val);
UserSetReg(1 , temp_val, 0);
// set float_val to ISaGRAF variable with network address 2
float_val = 1.2345 ;
temp_val = (long *)(&float_val);
UserSetReg(2 , temp_val, 1);
// set long_val to ISaGRAF variable with network address 4
long_val = 12345678 ;
temp_val = (long *)(&long_val);
UserSetReg(4 , temp_val, 2);
Содержание 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 ...