Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: cvetantokov 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
-
You need to use that code in a macropump.
-
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.