Hello Guest it is May 20, 2019, 03:12:12 PM

Author Topic: screen4 to brain button on/off vacuum table  (Read 3169 times)

0 Members and 1 Guest are viewing this topic.

screen4 to brain button on/off vacuum table
« on: February 04, 2009, 04:54:20 AM »
Hi All,

I am sorry to write to you but I have watched all the videos and look at most of the posts.

I have made A button in screen4 and put an LED behind it to turn my vacuum table on and off.
I under stand modbus and how to write brains (I think quite well as I am controlling my VSD and displaying torque, amps and real speed on the mach screen)
but I can't find how to link the new button and LED to the brain (ie oem number etc)

I want the button on the screen  to momentary switch the brain and pass on to the PLC, and the PLC to send back status and light the LED.

Maybe this should be in the screen4 forum?? but we will give it A try.

Kind regards,
David.

Offline poppabear

*
  • *
  •  2,231 2,231
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
Re: screen4 to brain button on/off vacuum table
« Reply #1 on: February 04, 2009, 10:19:25 AM »
Lets say your LED is called OEM # 2000 (your status LED), in screen 4 the one that you can see around the button, what you need is a two state process.

in your button put this code for instance:

If Not(GetUserLED(2001)) then 'this is the control LED
SetUserLED(2001,1) 'Note your Brain will turn this back off
end if

Next in your brain be watching LED2001 and send it to your PLC, have your Plc
data come in and have it same address comming in,
the first rung turns on LED 2000
the second rung turns OFF led 2001.

scott

Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/
Re: screen4 to brain button on/off vacuum table
« Reply #2 on: February 06, 2009, 03:39:04 AM »
Hi Poppabear,

Thanks for the help.
I did not end up using the script you sent me but it did send me down the right road of VB.
I found hot topic 4208.

I did not know that I had to edit the button from within Mach3 itself.
and ended up writing this:

If (GetUserLed( 2010 )) Then
SetUserLed( 2010,0 )
Else
SetUserLed( 2010,1 )
End If
End

I then look at LED2010 with A brain.

Every thing looks like it is going to work well so thanks again and I hope to help
someone ealse some time.

Regards
David.