Find and share HowTos to various installations / configurations!
2 posts • Page 1 of 1
2 posts
• Page 1 of 1
fmulder
Posts:330
Joined: Wed Feb 03, 2010 9:46 am
Is there a 'workProc' in the C# manager API ?
Postby fmulder »
I've developed drivers before and there was a HWService::workproc() where you could implement recurring tasks (like looking for incoming data on a serial port)
static void main()
{
// .. (do all the init and connect stuff)
while(true)
{
Thread.Sleep( 2000 );
// Get Access to the ProcessValues
var writeValues = myManager.ProcessValues;
writeValues.SetDpValue(
new Tuple<string, OaVariant>("mydp.element1", 1),
new Tuple<string, OaVariant>("mydp.element2", 2)
);
}
}
I'm planning a C# manager to do some database work and would like to dpSet() a status every second.