Applies To: |
|
Summary: |
We are using Dial-Up I/O in Citect 5.21 and can get it to dial on schedule OK. It connects, reads the tags and disconnects. However, we want a Cicode function to be able to force it to connect and stay connected. When finished with that particular device, we want it to disconnect and use the cached values until we need to connect again. |
Solution: |
Try the following concept in designing
your cicode;
1. Configure the device to be Scheduled as normal in Citect project editor. 2. On startup of Citect runtime, use IODeviceControl( sDevice, 9, ...) to dissable the scheduling task. 3. Set the cache time to as high as is required, IODeviceControl( sDevice, 11, ...), in milliSeconds. 4. Then use IODeviceControl( sDevice, 7, ...) to connect to the plc when required. 5. Then use IODeviceControl( sDevice, 8, ...) to dissconnect the plc when finished. There is another trick to update all the tags, not just those on the page you are currently viewing. Use the IODevice Control function as follows: IODeviceControl(sDevice,
16, 0)
INT hCon; FUNCTION INT hSched; FUNCTION FUNCTION |
Keywords: |
Related Links
Attachments