For Instruction

Topic: CL177

Definition

 

The For instruction indicates the starting point of a For - Next loop, and based on its user setting, determines how many times the For - Next loop will be executed in one program scan. Between the For instruction rung and the Next instruction rung, place the rungs of logic that should be repeated multiple times.

Caution: Placing one For-Next loop inside another For-Next loop is NOT permitted.

Setup

 

1 Number of loops: The Number of loops can be a constant typed directly or it can be any eligible Data Memory Address.

Note: If the Number of Loops setup is large, it will increase the program scan time.  When the program scan time exceeds the Watchdog Timer setup (Default = 200ms), the CLICK PLC drops from the Run mode.  You may increase the Watch Dog Timer setup.  


 

2 One Shot: Select the One Shot by clicking the check box. If One Shot is selected, the For-Next Loop will be processed (all loops) one time after being enabled. The For-Next Loop will not be executed again until there is another OFF-to-ON transition by the enabling contact.

Example Program

 

Example Program: For-Next Loop

In the following example, when X001 is ON, the Ladder Program is executed 100 times in one same program scan.

Related Topics:

Next Instruction

 

 

CLICK Help File Feedback and Comments

THIS FEEDBACK IS ONLY FOR THE CLICK PROGRAMMING SOFTWARE HELP FILE!!!

To submit SOFTWARE RELATED Comments or Feedback, click on the green text.

As a continued effort to provide the best products to our Customers, we provide this Feedback Page where you, the User, can easily communicate to us any issues, suggestions, and comments (good or bad) about this Help File.

Your input is very important to us!  Please take a minute to complete the information below. When finished, click the Send Feedback button and your email client will open with all the information already filled. If satisfied with the information, go ahead and send the email. Internet access and email account is required to send this email.

Thank you for helping us provide top quality products and for trusting AutomationDirect for your automation needs and services.

If we use the information you provide or post your comments on the official CLICK PLC Web Site or any other publication, we will send you a small gift as a way of thanking you for your input. The gift depends on what's available at the moment and may consist of a Cap, T-shirt or some other ADC souvenir.

Complete the form provided below and click on the Send Feedback button when finished to open your email client and send the form.

Subject:

Name:

Company:

We will  ONLY use your email address if you request a reply or if we need an address to send you a thank you gift:

Email:

Please provide your Shirt Size just in case the gift is a T-shirt.

Shirt Size:

Enter your Comments below:

I give AutomationDirect.com permission to use my feedback,

my name, and my company name.