Product : 3.23

Date    : 30-April-1998

File    : pid_alnt.using pid_al.c with isagraf nt target.htm

Subject : Using PID_AL.C with ISaGRAF NT target

Keywords: PID_AL - NT target


When you compile pid_al.c in order to build the ISaFBL library and

then link it to ISaGRAF kernel for generating of a new kernel

executable, the following error is generated:

cannot export LAST-DATE to ISaFBL.DLL.

LAST_DATE is declared in pid_al.c as an external variable, it's

defined in Tasy0tcy.c.


But as on NT, you've got an executable for kernel and a DLL for your

C function blocks, you would need to access from a DLL a data stored

in executable.


1st solution would have been to declare, in executable, LAST_DATE

as an exported variable.


We've choosen to export a function (called sys_get_lastdate) instead

of exporting a global variable.


To solve the problem you have, in pid_al.c, to make the following


- remove the line :extern unsigned long LAST_DATE.

- in the function FBACT_pid_al(...) insert the following definitions:

uint32 last_date;

last_date = sys_get_lastdate();

and then replace, in the remainder of the file, each LAST_DATE

with last_date.


Copyright © 1996-2009 ICS Triplex ISaGRAF Inc. All rights reserved.