Hello Guest it is October 22, 2019, 03:29:25 PM

Author Topic: Lag on inputs  (Read 751 times)

0 Members and 1 Guest are viewing this topic.

Lag on inputs
« on: November 07, 2018, 03:43:56 PM »
Hello
Short code:
Code: [Select]
SetOutBit(90, 2)
    CamRdy = false
    While(Not CamRdy)
        If(GetInBit(90, 10)) Then
        ResetOutBit(90, 2)
            CamRdy = true
        End If
    Wend

Oscilloscope hooked up to input nr 10 and output nr 2. There is a lag of about 100ms!

If I use code:
Code: [Select]
SetOutBit(90, 2)
Sleep(100)
ResetOutBit(90, 2)
Sleep(100)
SetOutBit(90, 2)
Sleep(100)
ResetOutBit(90, 2)

Then the impulse width on the output is 102-103ms.
So nothing wrong here, looks like there is lag on the inputs.

Offline TPS

*
  •  1,389 1,389
    • View Profile
Re: Lag on inputs
« Reply #1 on: November 08, 2018, 03:02:38 AM »
contact CSLAB via:  office@cs-lab.eu

and ask Wojtek Trawicki for Support.


 
anything is possible, just try it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Lag on inputs
« Reply #2 on: November 08, 2018, 03:25:54 AM »
That was the first thing I did :-)
Re: Lag on inputs
« Reply #3 on: November 09, 2018, 05:45:19 PM »
Today I got an answer: "We tested it on our setup and average lag time was 90ms, we advise to use PLC in this case".
Re: Lag on inputs
« Reply #4 on: November 09, 2018, 05:53:12 PM »
Two-three hours later something came to my mind:
It's weird, when I run one of the axis against a limit switch, the reaction time is usually below 10ms.
When I run the tool length macro it's the same.
Why on earth here is 90-100ms?
Tomorrow I'll define those inputs and outputs from Csmio in the MACH3, then declare them in my test macro and see what happens.
Re: Lag on inputs
« Reply #5 on: November 11, 2018, 03:37:53 PM »
I did this test and came with the same unacceptable delay.
So I can't make my tool changer to work correctly.

Offline TPS

*
  •  1,389 1,389
    • View Profile
Re: Lag on inputs
« Reply #6 on: November 15, 2018, 02:25:36 AM »
hello,

you can try to add two additional relays for a "Hardware Stop"

according to attached drawing

Rel1 -> Motor turn relay
Rel2 -> enable stop relay
Rel3 -> stop relay paralell to CSMIO Input

Software sequence would be:
1- turn Rel1 on to turn turret
2- if turret Position reached turn Rel2 on to enable HW Stop
3- if Input is ON turn OFF Rel1 + Rel2

with this small circuit you will get the fastest stop time, because the Rel3 will turn OFF the motor



anything is possible, just try it.
if you find some mistakes, in my bad bavarian english,they are yours.