Hello Guest it is April 19, 2024, 05:18:01 AM

Author Topic: Need Help With Outputs  (Read 2088 times)

0 Members and 1 Guest are viewing this topic.

Need Help With Outputs
« on: March 10, 2016, 01:58:39 PM »
Hello,
i am not good in programing so maybe i have stupid question but i dont know how to do it.
So i need a button script that put ON Output 4 until INPUT 1 is active ,then stop the power to output 4,
i tryed this :
DoOEMButton(233)
IF IsActive(INPUT1)then
DoButton(234)
DoButton(0) // to start cycle :)

But this works only if i activate INPUT1 it doesnt wait it.
this si to control DC Motor with switches . So i dont know how to do it or how to LOOP the "IF" until is active INPUT1.
Sorry for poor English.
Thanks

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Need Help With Outputs
« Reply #1 on: March 10, 2016, 06:28:16 PM »
You need to use that code in a macropump.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Need Help With Outputs
« Reply #2 on: March 11, 2016, 02:05:54 AM »
Can you tell what i must do because i am new in programing and Mach and i dont know how to do it .And i think with "IF" will not wait until INPUT1 is ACTIVE And stop OUTPUT4 ... I am not sure is the code correct.So i want when i click the button to active OUTPUT4(which activate the motor) and wait until INPUT1 is Active (Sensor)
then stop the OutPUT4 and start Cycle.