Page 1 of 1

Field

PostPosted: Sat Jul 30, 2022 2:43 am
by mark4
Hello
I have been searching fields and cant seem to figure it out. I need to add a dro to a screen to count from 1 to 21 for a tool change.
The sensor pulses once per tool. I have been studying but am lost. Can somebody provide an example.
Thank you
Mark

Re: Field

PostPosted: Sun Jul 31, 2022 10:41 pm
by mark4
Why is is nobody wants to answer this question?
I have asked it several times in several ways.
I really need to set up some dro's to work my tool changer.
Or at least get started on it. i do not understand what i am missing nor can I find an example to help
Is there another way I should be counting the tool stations?
I have one sensor that goes from 1 to 21 tools once per tool
and i have a home sensor to set to tool 1.
Please help me to program this.
Mark

Re: Field

PostPosted: Sun Jul 31, 2022 11:22 pm
by ger21
Without detailed information on what you want to happen, it's difficult to know exactly what you want.
You need to write a macroloop to monitor the sensor.
Not sure how you plan on homing the carousel, and setting the initial field to 1.
Your macro loop would be something like this, after the homing.
Code: Select all

while(loop)
{
int toolno = Getfield(fieldnumber) ; // Get current value of field

if GetLED(xx) // If the LED for the sensor input is active...
     {
     toolno = toolno + 1;  // When the sensor is triggered, add 1 to the tool number.
     AS3.Setfield( toolno, fieldnumber);
     AS3.Validatefield (fieldnumber);
     }
Thread.Sleep(50)
}




You'll probably need to check if the tool number = 22, then reset it to 1

Re: Field

PostPosted: Thu Aug 04, 2022 3:22 pm
by mark4
Thank you.
I have a home sensor to be used when the carousal is homed. When homed the sensor would set reset the initial field to 1
my biggest problem so far is I dont understand field or which field to use.
I look at field by number in docs and do not know how to apply. or which field number to use. or is it label
tool home sensor is input 11 port 4
tool once per tool is input 12 port 4
I have added the field to the screen but come right back to which label. none of them seem to be what I require.

also is there a way to turn on an input in demo mode. I am not programming on the machine right now and need to simulate input.
I managed the outputs no problem. when i get this dro working i will want to test with a sim input but didnt want to add a whole slew of user leds to do it
but I will I just want to know if there is another way.

will it help to post my profile? if so how do I package it for post
I look forward to your reply
Mark