Hello Guest it is April 28, 2024, 03:24:06 PM

Author Topic: Execute Button Script with button configured screen designer  (Read 890 times)

0 Members and 1 Guest are viewing this topic.

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: Execute Button Script with button configured screen designer
« Reply #20 on: January 27, 2024, 10:48:29 AM »
so it looks like UserLed(1500) is false if you push the buttom

in this case If condition should look like this:
Code: [Select]
If ((GetUserLed(1500) = False) And (GetUserLed(1501) = True))  Then
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Execute Button Script with button configured screen designer
« Reply #21 on: January 27, 2024, 02:17:56 PM »
I tried but if I put true
And (GetUserLed(1501) = True))  Then
the button doesn't work...
I have to put false
And (GetUserLed(1501) = False))  Then
otherwise it doesn't work, I don't know why...

If I leave it false, is it a problem could I have malfunctions?


Re: Execute Button Script with button configured screen designer
« Reply #22 on: January 27, 2024, 05:25:08 PM »
I tried to implement the button from the panel by adding to the code in macropump as you wrote

 Or (GetUserLed(1503) = True) Then

and I modified the button script as per the attached image (imm-f)

I tried but failed to invoke GetUserLed(1503)...
I press the button on the panel but nothing happens...
am I doing something wrong?

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: Execute Button Script with button configured screen designer
« Reply #23 on: January 28, 2024, 04:16:56 AM »
for test place three simple Led's on your screen (1500,1501,1503)
to see the status of those three led's.
then you can witch is true or false.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Execute Button Script with button configured screen designer
« Reply #24 on: January 28, 2024, 05:52:58 PM »
hi TPS I did the tests with the LEDs.
And they worked in the panel.
At this point, however, I was unable to recall UserLed1503..
I tried to replace the code in macropump using the codes 1 and 0 (Imm-g) instead of the booleans true and false.
It worked great.

The cycle start panel button works!!! calls the script contained in macropump.
And the external button with userled1500-1501 from external button from brain also works. At this point I changed the brain to pass signal (imm-b1).
Great job, thanks again for your help, you were very kind, I couldn't have done it without you.