# Build the Input Task - InputFormat Task

The InputFormat Task is constructed from a Read PLC block, a Format PLC Input Buffer block, a Decompose Collection block and a Script block. The Task is triggered by the Cognex Communication Card FFP New User Data script point, so the Task will run whenever the PLC sends new User Data to Designer.

Note: For more information, see the NDM Event Handlers and NDM Control Signals Descriptions topics.

1. The User Data is read from the PLC, and then formatted by the Format PLC Input Data and Decompose Collection blocks.

2. The Read PLC block has the Selected Device property set to the Cognex Communication Card. If a Vision Controller is being used, it can be used as the Selected Device, as well.

3. The Format PLC Input Data block is configured as shown in the figure below:

   Note: This configuration works for all of the supported protocols, EtherNet/IP, PROFINET and SLMP. Simply select the appropriate protocol from the Protocol setting. See the Format PLC Input Buffer Data Format Dialog topic for more information.

4. The Decompose Collection block is configured as shown in the figure below:

5. The Script block performs logging actions, using the following script:

       $Counter++;
       $Log = "Data received. (" + $Counter + ")" + Environment.NewLine + $Log;