LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

motor loop

Hi,

I have to give a command to the motor to turn the brawer step by step. When I try to turn it step by step it works. However, when I use a loop it doesn't work I don't know why I changed anything. My code is the next :

int i;                                                                
        ComWrt(1,"\r",StringLength("\r"));
        for(i=0;i<360;i++)
        {
            /* begin the rotation */
            ComWrt(1,"SK(i)",StringLength("SK(i)"));
               /* wait 5 seconds the time to make the measure */
             ComWrt(1,"\r",StringLength("\r"));
             DelayWithEventProcessing (5);
            /* stop the measure */
             ComWrt(1,"CP(i)",StringLength("CP(i)"));
             ComWrt(1,"\r",StringLength("\r"));
            break;
        }
        GetCtrlVal(panelHandle,PANEL_intervalTimer,&IntervalTimer);

 

Thank you to help me

Anaël.

0 Kudos
Message 1 of 1
(2,785 Views)