To work around this problem, use
semaphores to control access to the device. For example, create a
semaphore for the device and get the semaphore before each task
tries to access the device. In this way only one task will access
the device.
Alternatively, create two devices that access the same physical
device, with each task using its own device. For example DEVICE1
and DEVICE2 that both access dBASE file DEVICE.dbf. With this
solution, each device has its unique record pointer and Citect will
do record locking to control access to the DEVICE.dbf file. This
solution will only work with database type devices as these device
do record locking. This solution will not work with ASCII
files. |