In V5.xx the way that Cicode functions are
executed from DDE has changed. In older Citect versions when a
Cicode function was called from DDE then the function would execute
without first reading any data from the PLC. This could cause the
Cicode function to access stale data and a ReRead() in the function
was necessary to avoid this. In the current version all the PLC
data required in the Cicode function will be read before the
function starts executing. If the Cicode function touches a large
number of PLC tags and the PLC communications are slow, this could
delay the start of the function.
Check what PLC tags your function is touching and keep this to a
minimum. Also, make sure your data is blocked optimally in your
PLC. If you don't want the Cicode to read from the PLC first then
create a stub Cicode function which you call via DDE. This function
will simply call TaskNew() to your main Cicode function.
|