I tested it in real life, i changed DRO817 to DRO 202 in order to have spindel speed override working but in general, exept of a minor problem, it worked immediate.The small problem was that this line: SetOEMDro(1200,GetOEMDro(817)-8000) must be changed to SetOEMDro(1200,(GetOEMDro(817)-8000)) in order t get it working. The complete working code now is:
If GetOEMDRO(202) <= 8000 Then
SetOEMDro(1200,0)
Else
SetOEMDro(1200,(GetOEMDro(202)-8000))
End If
Thanks for the good help. This never had came to a good end without your help.