Hello Guest it is April 23, 2024, 11:25:19 AM

Author Topic: User Led not setting  (Read 975 times)

0 Members and 1 Guest are viewing this topic.

User Led not setting
« on: January 20, 2022, 03:50:02 PM »
I've bounced all over the place online looking for a answer to this issue.
For whatever reason I cant change the state of any user defined LEDs.
If I'm not mistaken Its just SetUserLED(***,1) for on, this for whatever reason doesn't do anything to the LED, I don't know if its because I'm doing my testing on a computer that's not even connected to a cnc or what.

The script I'm using it in is supposed to find the end line for any code loaded into mach3 and once its done it should light up the led but it doesn't.
Dro 1202 is just to show that its running through, it doesn't actually do anything
Code: [Select]
Dim I
Dim textLine

Open FileName For Input As #1

While Not EOF(1)
Line Input #1, textLine
I = I + 1
SetuserDro(1202, I)
Wend

Close #1

Call SetUserDRO(1200,I)
Call SetUserLED(500, 1)
Re: User Led not setting
« Reply #1 on: January 23, 2022, 05:56:52 AM »
Hi    jpryder5
I suppose you want to set LED1202. But in your sample code you are trying to set DRO 1202.

Klaus
The brain isn't a soap, it doesn't shrink when used.
Re: User Led not setting
« Reply #2 on: February 05, 2022, 01:12:35 PM »
Hi    jpryder5
I suppose you want to set LED1202. But in your sample code you are trying to set DRO 1202.

Klaus
Dro 1202 is used to show what line the code is currently at as it reads the gcode. Dro 1200 is used to store the end line so that it can be used to calculate the percentage of code ran.

At the bottom of the code I'm trying to set a led after everything has been ran as a sort of indicator for when it's finished running the script. But for some reason SetUserLed doesn't do anything to any user defined LEDs.

Offline Graham Waterworth

*
  • *
  •  2,673 2,673
  • Yorkshire Dales, England
    • View Profile
Re: User Led not setting
« Reply #3 on: February 05, 2022, 05:50:54 PM »
From memory I think user LED's start at 1000 anything below 1000 is usually system related.
Without engineers the world stops
Re: User Led not setting
« Reply #4 on: February 05, 2022, 06:02:10 PM »
Try using a LED number > 1000.

Klaus
The brain isn't a soap, it doesn't shrink when used.
Re: User Led not setting
« Reply #5 on: October 25, 2023, 11:37:41 PM »
Try using a LED number > 1000.

Klaus
Thanks for that information, but how does a person determine or set what number a User Led is for a script to call it?

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: User Led not setting
« Reply #6 on: October 26, 2023, 03:19:23 AM »
see attachment
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.