Introduction
This article describes the initial connection between a NQ HMI and a PLC using Hostlink protocol.
For the example below a NQ3-TQ000B and a CP1L PLC will be used.
Cables required for a good connection are:
NQ-CN222 or NQ-CN521 to connect to CP1W CIF01 or directly to CJ1M PLC. For pin-outs of these cables look in the appendix of the introduction manual (V07-EN-0*). NQ-CN221 is also available for connection to the mini-peripheral connector for CJ1.
NQ:
- Create a new application.
- Go to COM tab or nodes folder and add Host link protocol and appropiate PLC (standard communication settings ,9600,1,7,2,E).
- After clicking add you will see following been created in Nodes folder:
Important: Default node number is 1 - Create a PLC tag in the tagdatabase, example CIO 100.
- Open screen 1 and place a Numeric Data Entry on the screen.
- Assign the created PLC tag to the Numeric data entry.
- Download application AND firmware into the NQ
PLC:
- Create a new application
- Got to PLC Settings, Serial Port and select Mode Host link and standard settings.
- Go to unit number and change to 1:
- Download changed settings to PLC.
Connection:
After connecting the correct cable to the communication will be established which will result in a steady Blue RUN led on the NQ.
The Numeric datadisplay will show the value of CIO100 of the PLC.
Attached you will find a small sample application for NQ3 and Hostlink setting. In this program also CIO100 is used to display the value.
Pressing the + or - buttons will increase / decrease the value of CIO100. On a CP1L PLC you will directly see the result in as outputs will be switched on or off.
Also an empty PLC program (CP1L empty) for CP1L-L PLC is added for correct settings.
Downloading both NQ3 and PLC sample program to your hardware AND using the correct cable should result in a working data exchange between PLC and NQ3.