Introduction - If you have any usage issues, please Google them yourself
Be careful not to send the commands too fast. Once per plc cycle (100 ms in my case) seems to be the limit.
This code is in VB6, but the same could be applied in C# or any other languages. If you want me to make an example in C#, please contact me.