Brother MELSEC iQ-F TD-4420TN Program Reference Manual
Brother MELSEC iQ-F TD-4420TN Program Reference Manual

Brother MELSEC iQ-F TD-4420TN Program Reference Manual

Hide thumbs Also See for MELSEC iQ-F TD-4420TN:

Advertisement

Quick Links

MELSEC iQ-F
Brother
Label Printer Sample Program
Reference Manual
Version 1.00

Advertisement

Table of Contents
loading

Summary of Contents for Brother MELSEC iQ-F TD-4420TN

  • Page 1 MELSEC iQ-F Brother Label Printer Sample Program Reference Manual Version 1.00...
  • Page 2 The Brother logo is a registered trademark of Brother Industries, Ltd. Brother is a registered trademark of Brother Industries, Ltd. © 2023 Brother Industries, Ltd. All rights reserved. Other software and product names mentioned herein may be the trademarks or registered trademarks of...
  • Page 3 Supported printers Supported printers TD-4420TN TD-4520TN TD-4650TNWB TD-4650TNWBR TD-4750TNWB TD-4750TNWBR TJ-4005DN TJ-4010TN TJ-4020TN TJ-4021TN TJ-4021TNR TJ-4120TN TJ-4121TN TJ-4121TNR TJ-4420TN TJ-4422TN TJ-4520TN TJ-4522TN TJ-4620TN Available printers are depending on region or countries. MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 4: Table Of Contents

    6.1.3. Program detail ................20 6.2. For Ethernet connection ................23 6.2.1. Use program .................. 23 6.2.2. Label variable definition ..............24 6.2.3. Program detail ................25 [Appendix A] Related Manual ································································ 31 MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 5 Revision history Reference manual revision history Version Revised day Revised content V1.00 2023/2/1 New creation Sample program revision history Version Revised day Revised content V1.00 2023/2/1 New creation MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 6: Introduction

    3.3. Serial communication settings 4. Setting at programmable controller side 4.1. For serial connection 5. Sequence program outline 5.1. Function outline 5.2. Program outline 6. Sequence program explanation 6.1. For serial connection MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 7: For System Structure With Ethernet Connection

    3.4. Ethernet communication settings 4. Setting at programmable controller side 4.2. For Ethernet connection 5. Sequence program outline 5.1. Function outline 5.2. Program outline 6. Sequence program explanation 6.2. For Ethernet connection MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 8: Outline

    The programmable controller CPU starts program and requests printing to the label printer at the same time. The label printer prints out the label according to the designated command from programmable controller. MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 9: Label Printer Structure

    2.2. Label printer structure Label printer  The sample program is applied to the following Brother label printers. Brother label printers TD-4420TN TD-4520TN TD-4650TNWB TD-4650TNWBR TD-4750TNWB TD-4750TNWBR TJ-4005DN TJ-4010TN TJ-4020TN TJ-4021TN TJ-4021TNR TJ-4120TN TJ-4121TN TJ-4121TNR TJ-4420TN TJ-4422TN TJ-4520TN TJ-4522TN TJ-4620TN * Any printers other than above list, which has FBPL command and interface of serial or Ethernet, have capability to connect with the programmable controller.
  • Page 10: Rs-232C Serial Port Pinout

    Signal Pin No. Pin assignment Pin No. Signal Connect to CH1 2.2.2. Ethernet connection device  Switching hub supporting 100BASE-TX (or repeater hub) LAN cable  Category 5 cable supporting 100BASE-TX MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 11: System Structure

    * This program is created by GX Works3 Version 1.070Y. 2.3.2. For Ethernet connection The following shows sample program system structure for Ethernet connection in this manual. Programmable controller Label printer LAN cable IP address: 192.168.1.2 IP address: 192.168.1.1 MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 12 Programmable controller module and development tool  Module type Model Programmable controller module CPU module FX5U-32MR/ES * This program is created by GX Works3 Version 1.070Y. MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 13: Label Printer Setting

    * For the above label printers, connection operation check with the Mitsubishi programmable controller has already finished, but other models supporting the FBPL printing command are possible to be connected. For more detail, refer to the following URL. (https://support.brother.com/g/s/es/dev/en/command/reference/index.html?c=eu_ot&lang=en&navi=offall&co mple=on&redirect=on) MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 14: Use Software

    Tool for settings at printer side You can download the latest version of software from Brother support website. Also, you can check the latest information of the supported OS and firmware version of each software in the Brother support website.
  • Page 15: Ethernet Communication Settings

    Click the “Set” button after changing to reflect the setting value. In this sample setting, the following screen is displayed. (If you want to change the setting, change the setting at programmable controller side as well.) MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 16: Setting At Programmable Controller Side (Melsec Iq-F Series)

     The setting remains as default condition. Registration of module labels  Select [Element Selection] → [Module] → [Module Label] → [FX5UCPU], and right-click [Add Module Label]. Set as shown above. MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 17 Parameter setting of FX expansion adapter (CH3) or FX expansion board (CH2)  The setting shall be the same as Communication Settings at label printer side. Parameters beside the above screen are the same as the default value. MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 18: For Ethernet Connection

     The setting remains as default condition. Registration of module labels  Select [Element Selection] → [Module] → [Module Label] → [FX5UCPU], and right-click [Add Module Label]. Set as shown above. MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 19 Network module (port 1) parameter setting (own node)  Parameters beside the above screen are the same as the default value. Network module (port 1) parameter setting (target node)  Set it to be connection No.1. MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 20: Sequence Program Outline

    5.1. Function outline Based on the information from the Mitsubishi programmable controller (MELSEC), this chapter explains the use example of the print operation using Brother label printer. 5.2. Program outline This program can transmit the following FBPL command to label printer just one time communication.
  • Page 21: Sequence Program Explanation

    BOOL Data transmission in execution bStartSend BOOL Transmission start bSend_OK BOOL Transmission success bSend_NG BOOL Transmission failure * Data type WORD Word [without code]/bit stream [16 bit] Word [with code] BOOL MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 22: Program Detail

    6.1.3. Program detail The following is the explanation of the program by function block. 6.1.3.1. Main routine Row number 7: Prepares the command in wSendData. MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 23 All command data in the ST language is as follows. wSendData[15]:=H6874; wSendData[16]:=H7265; wSendData[17]:=H0D22; wSendData[18]:=H500A; /* PRINT 1,1 line feed */ wSendData[19]:=H4952; wSendData[20]:=H544E; wSendData[21]:=H3120; wSendData[22]:=H312C; wSendData[23]:=H0A0D; wTransDataSize:=48; /* transmission data length */ MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 24 The data is transmitted with the number of bytes which is shown in the transmit data length wTransDataSize stored in wSendData [ ]. For the operation of M+FX5UCPU-SerialComm_Output, refer to “MELSEC iQ-F FX5 CPU Module Function Block Reference” for the Mitsubishi Electric programmable controller. MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 25: For Ethernet Connection

    GX Works3 Version 1.070Y Use language Ladder, ST language, FB Use FB For network module M+FX5UCPU-EN_ConnectionOpen M+FX5UCPU-EN_Send_Socket M+FX5UCPU-EN_ConnectionClose * Project file target programmable controllers are set by the MELSEC iQ-F series. MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 26: Label Variable Definition

    Socket close start FB bRunClose BOOL Socket close in execution bClose_OK BOOL Socket close success bClose_NG BOOL Socket close failure * Data type WORD Word [without code]/bit stream [16 bit] Word [with code] BOOL MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 27: Program Detail

    6.2.3. Program detail The following is the explanation of the program by function block. 6.2.3.1. Main routine Row number 7: Prepares the command in wSendData. Row number 9: Sends the prepared command. MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 28 /* TEXT 10,10,3,0,3,3, brother line feed */ wSendData[4]:=H5845; wSendData[5]:=H2054; wSendData[6]:=H3031; wSendData[7]:=H312C; wSendData[8]:=H2C30; wSendData[9]:=H3322; wSendData[10]:=H2C22; wSendData[11]:=H2C30; wSendData[12]:=H2C33; wSendData[13]:=H2C33; wSendData[14]:=H6222; wSendData[15]:=H6F72; wSendData[16]:=H6874; wSendData[17]:=H7265; wSendData[18]:=H0D22; wSendData[19]:=H500A; /* PRINT 1,1 line feed */ wSendData[20]:=H4952; wSendData[21]:=H544E; wSendData[22]:=H3120; wSendData[23]:=H312C; wSendData[24]:=H0A0D; MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 29 Row number 14: Calls Sub-routine SendData. when SM400 (Always ON) is ON. Row number 15: Turns ON bStartClose when bSend_OK is ON (Transmission success). Row number 16: Calls Sub-routine CloseSocket when SM400 (Always ON) is ON. MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 30 6.2.3.3. Socket communication connection open For the operation of M+FX5UCPU_EN_ConnectionOpen FB, refer to “MELSEC iQ-F FX5 Ethernet, EtherNet/IP, CC-Link IE Function Block Reference” for the Mitsubishi Electric programmable controller. MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 31 6.2.3.4. Socket communication data transmission For the operation of M+FX5UCPU_EN_Send_Socket FB, refer to “MELSEC iQ-F FX5 Ethernet, EtherNet/IP, CC-Link IE Function Block Reference” for the Mitsubishi Electric programmable controller. MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 32 6.2.3.5. Socket communication connection close For the operation of M+FX5UCPU_EN_ConnectionClose FB, refer to “MELSEC iQ-F FX5 Ethernet, EtherNet/IP, CC-Link IE Function Block Reference” for the Mitsubishi Electric programmable controller. MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...
  • Page 33: [Appendix A] Related Manual

     FBPL command reference  The above manuals are available to download from Brother support website. (https://support.brother.com) * The sample print program of this manual creates print data referring to FBPL command reference. ** For printing using the FBPL command, the printing method using a template is available in addition to the method by sending print data directly from the programmable controller as the sample print program of this manual.
  • Page 34 [Contact window] Product and support information Find Brother global website and select in your country or region: (https://www.brother.com) Developer support Top page: (https://support.brother.com/g/s/es/dev/en/index.html) Contact form: (https://secure6.brother.co.jp/dev/ContactUs_InputDisp.aspx) Brother group headquarters Brother Industries, Ltd. 15-1, Naeshiro-cho, Mizuho-ku, Nagoya, 467-8561, Japan MELSEC iQ-R Brother Label Printer Sample Program Reference Manual...

Table of Contents