Hello Guest it is December 14, 2019, 01:13:52 PM

Author Topic: plc from macro  (Read 171 times)

0 Members and 1 Guest are viewing this topic.

Offline Bill_O

*
  •  250 250
    • View Profile
plc from macro
« on: March 15, 2019, 07:50:07 AM »
Is it possible to run something in the plc from a macro?
I guess what I am asking is if I have the plc look for a setting to do something else at that time.
Somewhat like Daz used in his video about homing workaround.

Bill

Offline Chaoticone

*
  • *
  •  5,634 5,634
  • Precision Chaos
    • View Profile
Re: plc from macro
« Reply #1 on: March 15, 2019, 09:13:26 AM »
Define PLC.

There is the PLC script in the screen.

You could also have a physical PLC attached.

There is also the PMC objects in the screen which are generated an awful lot like physical PLCs ladder.
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline Bill_O

*
  •  250 250
    • View Profile
Re: plc from macro
« Reply #2 on: March 15, 2019, 09:20:57 AM »
Sorry I should have been more informative.
I am talking about the PLC Script in Mach4

Offline Chaoticone

*
  • *
  •  5,634 5,634
  • Precision Chaos
    • View Profile
Re: plc from macro
« Reply #3 on: March 15, 2019, 09:29:29 AM »
Ok, so you want something in the PLC script to run when something in a macro happens?

If so, have the macro change the value of a register. Have the PLC watch that register and when it equals whatever you set it to in the macro do your thing. And at the end of that thing set the register back to what it was before the macro changed it or the next time the PLC script runs it will do that thing again.

Macros and screen scripts are in completely different chunks. The only thing both can see are registers.
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline Bill_O

*
  •  250 250
    • View Profile
Re: plc from macro
« Reply #4 on: March 15, 2019, 09:31:25 AM »
Great
I will work on it