{"id":3370,"date":"2026-11-17T18:43:15","date_gmt":"2026-11-17T10:43:15","guid":{"rendered":"https:\/\/resource.fatek.com\/index.php\/2026\/11\/17\/p5hmi-fvd-en-28\/"},"modified":"2026-11-17T18:43:15","modified_gmt":"2026-11-17T10:43:15","slug":"p5hmi-fvd-en-28","status":"publish","type":"post","link":"https:\/\/resource.fatek.com\/index.php\/2026\/11\/17\/p5hmi-fvd-en-28\/","title":{"rendered":"Chapter 28 User-defined Protocol"},"content":{"rendered":"<p>\u3010User-defined Protocol\u3011function is the consulation mainly to provide the designer to connect the device according they need, define your own communication code, then communicate with the device, read or write to the device, generally can be used in simple communication connections,or in the case of a driver that is not currently supported in the software link. In addition, this\u3010User-defined Protocol\u3011function provide designers simple interface definition, no need to write a huge program, making it easier for designers to use, to achieve the purpose of communication with its equipment.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-001.jpg\" \/><\/p>\n<p>Figure 545 user-defined protocol illustration<\/p>\n<h3>28.1 \u3010User-defined Protocol\u3011Interface Description<\/h3>\n<p>This section describes the interface of the\u3010User-defined Protocol\u3011function that includes options and settings<\/p>\n<p>\u3010User-defined Protocol\u3011function can add a link from\u3010Project Explorer\u3011\u3010Link\u3011, choose\u3010User-defined Protocol\u3011at\u3010Manufacturer\u3011, and choose\u3010User-defined Protocol\u3011at\u3010Product Series\u3011, as shown below.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-002.jpg\" \/><\/p>\n<p>Figure 546 choose\u3010User-defined protocol\u3011<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-003.jpg\" \/><\/p>\n<p>Figure 547 choose\u3010Protocol Setting\u3011<\/p>\n<p>Then choose\u3010User-defined Protocol Setting\u3011, you can enter the instruction list set by User-defined Protocol Setting, as shown below, which set the meaning of the options, as shown in the table below.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-004.png\" \/><\/p>\n<p>Figure 548\u3010User-defined Protocol\u3011instruction list<\/p>\n<p>Table 305 properties of\u3010User-defined Protocol\u3011instruction list settings<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p><strong>Properties<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Description<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Add\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Add a communication instruction<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Edit\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Edit the communication instruction<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Duplicate\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Duplicate the communication instruction<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Delete\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Delete the communication instruction<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Import\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Import all the instructions from CSV file<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Export\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Export all the instructions to CSV file <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Browse\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Display all the instructions in HEX<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Enable\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>You can select the enable instruction<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010ID\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>ID number of ID<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Mode\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Display instructions on read and write mode.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Instruction\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Display the contents of instructions<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Send Data\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Display the instructions are read or write information<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Return Info.\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Display information such as the return data address. <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h4>28.1.1 Protocol Setting<\/h4>\n<p>Click\u3010Add\u3011can add a new communication instruction, enter the main edit interface of user-defined protocol, as shown below, each meaning of the setting, as the table shown below.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-005.png\" \/><\/p>\n<p>Figure 549\u3010User-defined Protocol\u3011main operation interface<\/p>\n<p>Table 306 properties of\u3010User-defined Protocol\u3011main operation interface settings<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p><strong>Options<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Description<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Mode\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>\u3010Read\u3011means to read instruction<\/p>\n<p>\u3010Write\u3011means to write instruction<\/p>\n<p>\u3010Static\u3011to send a fixed content data, enabling this will force the activation of \u3010Manually Send\u3011, When triggered, it will send static data.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Format\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>You can choose\u3010Hex\u3011or\u3010ASCII\u3011two kinds of formats<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Instrution Edit\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Edit the instruction you want to send.<\/p>\n<p>When the format is in HEX, can only enter 0-9\/a-f\/A-F, when you click on the other location in the screen will be automatically arranged into two numbers \/ letters for a group, and lowercase are converted into capital.<\/p>\n<p>If the format is ASCII, there is no such restriction.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Send Preview\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Preview window of sending instruction<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Return Preview\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Preview window of returning instruction<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Manually Send\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Manually send the instruction, the command will be sent when the Bit changes from off to on.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h4>28.1.2 Instruction<\/h4>\n<p>Below the \u3010User-defined Protocol Setting\u3011dialog, you can choose\u3010Instruction\u3011paging, as shown belown, each meaning of the setting, as the table shown below.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-006.png\" \/><\/p>\n<p>Figure 550\u3010User-defined Protocol Setting\u3011instruction paging<\/p>\n<p>Table 307 properties of\u3010User-defined Protocol Setting\u3011instruction paging setting<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p><strong>Options<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Description<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Add Control Character\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>You can choose special character add into instruction edit dialog,<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010No Receiving\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Set whether or not to return the instructions, this function will appear when the mode set \u3010Write\u3011.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Send Length\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Set the length of the return instruction request, in bytes.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Return Length\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Set the length of the received return data. Reception of the end code will stop the reception of return messages.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Use End Code\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Checking this option means using the end code to determine the end position of the return message. <\/p>\n<p>Once checked, \u3010Return Length\u3011will change to \u3010Max Return Length\u3011. If the termination character is not received, the reception will stop at the length set in this field.<\/p>\n<p>\u3010End code\u3011the end code to be used, must be filled in hexadecimal format, for example, 0D 0A.<\/p>\n<p>\u3010Position\u3011the selected end code will force the checksum position to be set to the end. The sequence of checksum and termination character settings is as follows:<\/p>\n<p>\t\u3010After Checksum\u3011reception of the return message stops upon receiving the end code, and the remaining message is not received.<\/p>\n<p>\t\u3010Before Checksum\u3011after receiving the end code of the return message, a checksum will be received, and the remaining message is not received.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Delay Time\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>After sending the set of instruction, delay how many times to send the next instruction, the amount of reading and writing will affect this time.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h4>28.1.3 Send Data<\/h4>\n<p>Below the \u3010User-defined Protocol Setting\u3011dialog, you can choose\u3010Send Data\u3011paging, as shown belown, each meaning of the setting, as the table shown below.<\/p>\n<p><img decoding=\"async\" alt=\"C:\\Users\\chien yu\\Desktop\\fv 1.5 pic\\482.JPG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-007.jpg\" \/><\/p>\n<p>Figure 551\u3010User-defined Protocol Setting\u3011send data paging<\/p>\n<p>Table 308 properties of\u3010User-defined Protocol Setting\u3011send data paging setting<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p><strong>Options<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Description<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Add Instruction\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>When\u3010Mode\u3011choose in\u3010Read\u3011, it can be checked. Let the user set the command to variable.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Position\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>It can set the position of sending data in the sending instruction, and set it through\u3010Start\u3011and\u3010Length\u3011, for easy to use, you also can set start position and length <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Type\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Set the type of writing, including bit, word, double word.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Address\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>When\u3010Mode\u3011is\u3010Read\u3011or\u3010Write\u3011, the command sent includes the storage address of the variable.<\/p>\n<p>When\u3010Manually Send\u3011 is not checked, it will be sent according to the \u3010Delay Time\u3011. <\/p>\n<p>When \u3010Manually Send\u3011 is checked and the Bit is On, data will only be sent when there is a change.<\/p>\n<p>When\u3010Mode\u3011is\u3010Static\u3011or\u3010Write\u3011, this function annot be used here.<\/p>\n<p><strong>Note : PLC addresses cannot be used here; only internal HMI addresses or addresses specific to the driver can be used. <\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Byte Order\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>\u3010Bit\u3011<\/p>\n<p>When\u3010Type\u3011is\u3010Bit\u3011,<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p><strong>Bit(Assume that the starting position is Bit0)<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" alt=\"C:\\Users\\chien yu\\Desktop\\\u9621\u55bb\\FvDesigner\u548cPLC\u4f7f\u7528\u624b\u518a\\Fv manual\\184.JPG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-008.jpg\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u3010Byte Order\u3011<\/p>\n<p>When\u3010Type\u3011is\u3010Word\u3011or\u3010DWord\u3011, can choose\u3010Big Endian\u3011or\u3010Little Endian\u3011to sort.<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td colspan=\"2\">\n<p><strong>Word<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>With 2 Bytes as a unit<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>Big Endian<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Little Endian<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-009.png\" \/><\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" alt=\"C:\\Users\\chien yu\\Desktop\\\u9621\u55bb\\FvDesigner\u548cPLC\u4f7f\u7528\u624b\u518a\\Fv manual\\185.JPG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-010.jpg\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td colspan=\"2\">\n<p><strong>DWord<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>With 4 Bytes as a unit<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>Big Endian<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Little Endian<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-011.png\" \/><\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-012.png\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h4>28.1.4 Return Data<\/h4>\n<p>Below the\u3010User-defined Protocol Setting\u3011dialog you can choose\u3010Return Data\u3011paging, as shown belown, each meaning of the setting, as the table shown below.<\/p>\n<p><img decoding=\"async\" alt=\"C:\\Users\\chien yu\\Desktop\\\u9621\u55bb\\FvDesigner\u548cPLC\u4f7f\u7528\u624b\u518a\\Fv manual\\143.JPG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-013.jpg\" \/><\/p>\n<p>Figure 552\u3010User-defined Protocol Setting\u3011returndata paging<\/p>\n<p>Table 309 properties of\u3010User-defined Protocol Setting\u3011return data paging setting<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p><strong>Option<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Description<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Position\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Set the position of the received return data within the command using \u3010Start\u3011and \u3010Length\u3011. In the \u3010Instruction\u3011, you need to set the \u3010Return Length\u3011.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Type\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Set the type of store, include bit, word, double word <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Address\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>When\u3010Mode\u3011is\u3010Read\u3011or\u3010Write\u3011, the command sent includes the storage address of the variable.<\/p>\n<p>When\u3010Mode\u3011is\u3010Static\u3011or\u3010Write\u3011, this function annot be used here.<\/p>\n<p><strong>Note : PLC addresses cannot be used here; only internal HMI addresses or addresses specific to the driver can be used.<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Byte Order\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>\u3010Bit\u3011<\/p>\n<p>When\u3010Type\u3011is\u3010Bit\u3011,<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td colspan=\"2\">\n<p><strong>Bit<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>1 Byte for 1 Bit<\/p>\n<\/td>\n<td>\n<p>1 Byte for 2 Bits<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>Turn each byte to one bit<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Turn each byte to 2 bits<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-014.jpg\" \/><\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-015.jpg\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u3010Byte Order\u3011<\/p>\n<p>When\u3010Type\u3011is\u3010Word\u3011or\u3010DWord\u3011, can choose\u3010Big Endian\u3011or\u3010Little Endian\u3011to sort.<\/p>\n<p>Difference shown as below<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td colspan=\"2\">\n<p><strong>Word<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>Big Endian<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Little Endian<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-016.jpg\" \/><\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-017.jpg\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td colspan=\"2\">\n<p><strong>DWord<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>Big Endian<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Little Endian<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-018.jpg\" \/><\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-019.jpg\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h4>28.1.5 Checksum<\/h4>\n<p>Below the\u3010User-defined Protocol Setting\u3011dialog, you can choose\u3010Checksum\u3011paging, as shown belown, each meaning of the setting, as the table shown below.<\/p>\n<p><img decoding=\"async\" alt=\"C:\\Users\\chien yu\\Desktop\\\u9621\u55bb\\FvDesigner\u548cPLC\u4f7f\u7528\u624b\u518a\\Fv manual\\144.JPG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-020.jpg\" \/><\/p>\n<p>Figure 553\u3010User-defined Protocol Setting\u3011checksum paging<\/p>\n<p>Table 310 properties of\u3010User-defined Protocol Setting\u3011checksum paging setting<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p><strong>Option<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Description<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Checksum\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Provides an automatic calculation of the checksum.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Send Checksum\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Under add method of\u3010Send Instruction\u3011, provides\u3010Local\u3011and\u3010Driver\u3011two methods.<\/p>\n<p>\u3010Local\u3011<\/p>\n<p>When choose\u3010Local\u3011, indicates that the checksum needs to be entered manually in the \u3010Send Instruction\u3011, the following will have a \u3010Setting\u3011 option to facilitate the use of designers to calculate.<\/p>\n<p>\u3010Setting\u3011<\/p>\n<p>It will appear\u3010Check Calculation\u3011dialog after click setting, as shown below<\/p>\n<p><img decoding=\"async\" alt=\"C:\\Users\\chien yu\\Desktop\\1.JPG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-021.jpg\" \/><\/p>\n<p>\u3010Input Instruction\u3011<\/p>\n<p>Data of the\u3010Instruction Edit\u3011on the main operation interface.<\/p>\n<p>\u3010Quick Add\u3011<\/p>\n<p>Click the botton then will copy the value form\u3010Input Instruction\u3011to the\u3010Instruction\u3011field<\/p>\n<p>\u3010Instruction\u3011<\/p>\n<p>An instruction of using to calculate checksum<\/p>\n<p>\u3010Checksum\u3011<\/p>\n<p>The way to calculate checksum, includes none, CRC, SUM(BYTE), SUM(WORD), XOR, AND, OR, LRC, SUM Complement, SUM Radix-Minus-One Complement, etc.<\/p>\n<p>\u3010Calculate\u3011<\/p>\n<p>Calculate checksum\uff0cthe results will display on\u3010Calculate Result\u3011\u3002<\/p>\n<p>\u3010Calculate Result\u3011<\/p>\n<p>Except LRC, other instructions converted to HEX format to be calculated.<\/p>\n<p>\u3010Composite Instruction\u3011<\/p>\n<p>Combine the calculation result and the origin instruction, the value will show up in\u3010Result\u3011<\/p>\n<p>\u3010OK\u3011<\/p>\n<p>Store the value of\u3010Result\u3011to the data of the main operation interface\u3010Instruction Edit\u3011<\/p>\n<p>\u3010Cancel\u3011<\/p>\n<p>Leave this dialog, it won\u2019t change anything.<\/p>\n<p>\u3010Driver\u3011<\/p>\n<p>When choose\u3010Driver\u3011, indicates that the checksum will be automactically calculated and generated by the driver, the system will calculate checksum from\u3010Start\u3011, bytes of\u3010Length\u3011checksum, and insert it into\u3010Position\u3011,as shown below.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-022.png\" \/><\/p>\n<p>\u3010Range\u3011<\/p>\n<p>set the range of checksum calculation.<\/p>\n<p>\u3010Start\u3011<\/p>\n<p>Set the position where the checksum starts to calculate <\/p>\n<p>\u3010Length\u3011<\/p>\n<p>Set the length of the checksum calculation, in bytes<\/p>\n<p>\u3010Position\u3011<\/p>\n<p>Set the position where the checksum calculation result is inserted<\/p>\n<p>\u3010Automatically fill in\u3011<\/p>\n<p>For easy to use, you can also select the starting position and length in the\u3010Send Preview\u3011window, when you press the\u3010+\u3011button next to\u3010Length\u3011, you can fill in the \u3010Start\u3011 and \u3010Length\u3011 fields automatically.<\/p>\n<p>\u3010Type\u3011<\/p>\n<p>Choose the type of checksum calculation, includes none, CRC, SUM(BYTE), SUM(WORD), XOR, AND, OR, LRC, SUM Complement, SUM Radix-Minus-One Complement, etc.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010Return Checksum\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>When it has return instruction, you can set whether to verify the return data in the checksum.<\/p>\n<p>\u3010Range\u3011<\/p>\n<p>set the range of checksum calculation.<\/p>\n<p>\u3010Start\u3011<\/p>\n<p>Set the position where the checksum starts to calculate.<\/p>\n<p>\u3010Length\u3011<\/p>\n<p>Set the length of the checksum calculation, in bytes.<\/p>\n<p>\u3010Position\u3011<\/p>\n<p>Set the position where the checksum calculation result is inserted<\/p>\n<p>\u3010Automatically fill in\u3011<\/p>\n<p>For easy to use, you can also select the starting position and length in the\u3010Return Preview\u3011window, when you press the\u3010+\u3011button next to\u3010Length\u3011, you can fill in the\u3010Start\u3011and\u3010Length\u3011fields automatically.<\/p>\n<p>\u3010Type\u3011<\/p>\n<p>Choose the type of checksum calculation, includes none, CRC, SUM(BYTE), SUM(WORD), XOR, AND, OR, LRC, SUM Complement, SUM Radix-Minus-One Complement, etc.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>28.2 \u3010User-defined Protocol\u3011Application examples<\/h3>\n<p>This section explains how to apply the\u3010User-defined Protocol\u3011function.<\/p>\n<h4>28.2.1 Establishing a Connection<\/h4>\n<p>First, create a connection under \u3010Link\u3011, selecting\u3010User-defined Protocol\u3011for the manufacturer and product series. Ensure that the parameter settings match the communication device interface.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-023.png\" \/><\/p>\n<p>Figure 554 Set up Link<\/p>\n<p>Switch to the\u3010Protocol Setting\u3011tab and click\u3010User-defined Protocol Setting\u3011to open the\u3010Instruction List\u3011.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-024.png\" \/><\/p>\n<p>Figure 555 Switch to Instruction List Page<\/p>\n<h4>28.2.2 Editing Commands<\/h4>\n<p>This example demonstrates using HMI to communicate with an FBs-PLC through commands. In the\u3010Instruction List\u3011, click Add and configure as follows:<\/p>\n<p>\u672c\u6b21\u7bc4\u4f8b\u4f7f\u7528HMI\u8207FBs-PLC\u4f7f\u7528\u6307\u4ee4\u65b9\u5f0f\u901a\u8a0a\uff0c\u5728\u3010\u6307\u4ee4\u5217\u8868\u3011\u4e2d\u9ede\u9078\u65b0\u589e\uff0c\u4e26\u4f9d\u4e0b\u5716\u8a2d\u5b9a<\/p>\n<ul>\n<li>Instruction Content : 02 30 31 34 36 30 31 52 30 30 30 30 30 37 30 03<\/li>\n<li>Remain the\u300cSend Data\u300dand\u300cChecksum\u300dtabs unchanged.<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-025.jpg\" \/><\/p>\n<p>Figure 556 Edit Command Content<\/p>\n<p>The command content explanation below should refer to the communication manual of the specific device.<\/p>\n<p>This is the FBs communication command:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-026.png\" \/><\/p>\n<p>Transmission Code Explanation<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>02<\/p>\n<\/td>\n<td>\n<p>30 31<\/p>\n<\/td>\n<td>\n<p>34 36<\/p>\n<\/td>\n<td>\n<p>30 31<\/p>\n<\/td>\n<td>\n<p>52<\/p>\n<\/td>\n<td>\n<p>30 30 30 30 30<\/p>\n<\/td>\n<td>\n<p>37 30<\/p>\n<\/td>\n<td>\n<p>03<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>STX<\/p>\n<\/td>\n<td>\n<p>Station No.<\/p>\n<\/td>\n<td>\n<p>Command code<\/p>\n<\/td>\n<td>\n<p>Data length<\/p>\n<\/td>\n<td>\n<p>R<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>Checksum<\/p>\n<\/td>\n<td>\n<p>ETX<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>The return command is as follows:<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>RR<\/p>\n<\/td>\n<td>\n<p>RR RR <\/p>\n<\/td>\n<td>\n<p>RR RR <\/p>\n<\/td>\n<td>\n<p>RR<\/p>\n<\/td>\n<td>\n<p>DD DD DD DD<\/p>\n<\/td>\n<td>\n<p>RR RR <\/p>\n<\/td>\n<td>\n<p>RR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>STX<\/p>\n<\/td>\n<td>\n<p>Station No.<\/p>\n<\/td>\n<td>\n<p>Command code<\/p>\n<\/td>\n<td>\n<p>Error code<\/p>\n<\/td>\n<td>\n<p>Data<\/p>\n<\/td>\n<td>\n<p>Checksum<\/p>\n<\/td>\n<td>\n<p>ETX<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>Set the return length to 13,<\/p>\n<p> with the return data starting at position 7 and a length of 4.<\/p>\n<p>Based on the command explanation above, this user-defined communication protocol action reads the value of R0.<\/p>\n<h4>28.2.3 Reading Values<\/h4>\n<p>After editing the command, go back to the project screen and add a display. Set the monitoring address to the address specified in the user-defined communication protocol. Once the project is downloaded, the values can be read.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-027.png\" \/><\/p>\n<p>Figure 557 Display Setup<\/p>\n<h3>28.3 \u3010User-defined Protocol\u3011use Script Application Example<\/h3>\n<p>This section explains how to use the\u3010User-defined Protocol\u3011function of the script, communicate with the Modbus device, and read the data of Modbus address, for example, HMI connect with FATEK FBs PLC through COM1, then connect with Modbus device of station number 1 through COM4 by using user-defined protocol, read the data of address 40001 through the script, as shown below.<\/p>\n<p><img decoding=\"async\" alt=\"C:\\Users\\chien yu\\Desktop\\1.JPG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-028.jpg\" \/><\/p>\n<p>Figure 558 HMI COM1 and COM4 connection page<\/p>\n<h4>28.3.1 Communication Instructions in Script<\/h4>\n<p>Use the function\u3010User-defined Protocol\u3011in script, will mainly use the\u3010io write and read\u3011and\u3010Checksum\u3011instruction, as shown below, each meaning of the setting as shown below, as the table below.<\/p>\n<p><img decoding=\"async\" alt=\"C:\\Users\\chien yu\\Desktop\\2.JPG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-029.jpg\" \/><\/p>\n<p>Figure 559 communication instruction in script<\/p>\n<p>Table 311 properties of communication instruction in script settings<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p><strong>Options<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Io write and read insruction description<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010P1\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>The start address to send instruction.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010P2\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Send the length of the instruction.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010P3\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Device name.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010P4\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>The start address to return instruction.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><strong>\u3010P5\u3011<\/strong><\/p>\n<\/td>\n<td>\n<p>Return the length of the instruction.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Options<\/p>\n<\/td>\n<td>\n<p>Checksum instrunction description<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u3010P1\u3011<\/p>\n<\/td>\n<td>\n<p>Calculation method.<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Value is<\/p>\n<\/td>\n<td>\n<p>Calculation method description<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>CRC<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>2<\/p>\n<\/td>\n<td>\n<p>SUM(BYTE)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>3<\/p>\n<\/td>\n<td>\n<p>SUM (WORD)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>4<\/p>\n<\/td>\n<td>\n<p>XOR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>5<\/p>\n<\/td>\n<td>\n<p>AND<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>6<\/p>\n<\/td>\n<td>\n<p>OR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>7<\/p>\n<\/td>\n<td>\n<p>LRC<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>8<\/p>\n<\/td>\n<td>\n<p>SUM Complement<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>9<\/p>\n<\/td>\n<td>\n<p>SUM Radix-Minus-One Complement<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\"><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u3010P2\u3011<\/p>\n<\/td>\n<td>\n<p>Calculate start address.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u3010P3\u3011<\/p>\n<\/td>\n<td>\n<p>Calculate words.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u3010P4\u3011<\/p>\n<\/td>\n<td>\n<p>Result store start address, starting with 1 or 2 consecutive words, depending on the calculation method<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h4>28.3.2 Communication Instruction in Script Application Example<\/h4>\n<p>Read the data of address 40001 of Modbus device through script, setting steps as follow.<\/p>\n<p>Step 1: Build a new project and build link 0, select Fatek FBs\/B1\/B1z\/HB1 driver, build link 1, select\u3010User-define Protocol\u3011driver, about the communication parameter settings are same as Modbus device, please refer to other relevant sections for this section. <\/p>\n<p>Step 2: Build 2 tags at Tag library, as shown below.<\/p>\n<p><img decoding=\"async\" alt=\"C:\\Users\\chien yu\\Desktop\\3.JPG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-030.jpg\" \/><\/p>\n<p>Figure 560 communication instruction in script<\/p>\n<p>Step 3: Write script, as shown below.<\/p>\n<ul>\n<li>First row specifies the name of the device to be read<\/li>\n<li>Second row is to set the instruction to be send.  <\/li>\n<li>Third row is to turn ASCII string into INT<\/li>\n<li>Fourth row is to calculate checksum<\/li>\n<li>Fifth row is to copy the checksum to send instruction<\/li>\n<li>Sixth row is to copy the checksum to send instruction<\/li>\n<li>Seventh row is to excute io_write_and_read instruction, send out the send instruction, and read the return data stored in $ U: V240 start of the seven consecutive addresses<\/li>\n<li>eighth to eleventh rows are convert read back data and store it in $ U: V300<\/li>\n<\/ul>\n<p><img decoding=\"async\" alt=\"C:\\Users\\chien yu\\Desktop\\\u9621\u55bb\\FvDesigner\u548cPLC\u4f7f\u7528\u624b\u518a\\Fv manual\\146.JPG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-031.jpg\" \/><\/p>\n<p>Figure 561 Read the 40001 address data script for the Modbus device<\/p>\n<p>Step 4: Planning a new\u3010Numeric Input\/Display\u3011object,\u3010Monitor Adderss\u3011set as $U:V300, as shown below, you can read the station number 1 Modbus device 40001 address value.<\/p>\n<p><img decoding=\"async\" alt=\"C:\\Users\\chien yu\\Desktop\\fv 1.5 pic\\502.JPG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-28\/p5hmi-fvd-en-28-032.jpg\" \/><\/p>\n<p>Figure 562 Planning a new\u3010Numeric Input\/Display\u3011object<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3010User-defined Protocol\u3011function is the consulation main [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[57],"tags":[],"class_list":["post-3370","post","type-post","status-publish","format-standard","hentry","category-en-p5hmi-fvd"],"_links":{"self":[{"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/posts\/3370","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/comments?post=3370"}],"version-history":[{"count":0,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/posts\/3370\/revisions"}],"wp:attachment":[{"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/media?parent=3370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/categories?post=3370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/tags?post=3370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}