[{"data":1,"prerenderedAt":1199},["ShallowReactive",2],{"docs-nav-docs_en":3,"docs-page-\u002Fen\u002Fexamples\u002Fserial-modbus-master":367,"docs-surround-\u002Fen\u002Fexamples\u002Fserial-modbus-master":1196},[4],{"title":5,"path":6,"stem":7,"children":8},"En","\u002Fen","en",[9,13,41,58,76,103,157,171,190,211,238,283,303],{"title":10,"path":6,"stem":11,"navTitle":12},"QInsight Documentation","en\u002Findex","Overview",{"title":14,"navTitle":15,"path":16,"stem":17,"children":18,"page":40},"Getting Started",null,"\u002Fen\u002Fgetting-started","en\u002F01.getting-started",[19,23,27,31,36],{"title":20,"path":21,"stem":22,"navTitle":20},"What is QENEX Suite","\u002Fen\u002Fgetting-started\u002Fwhat-is-qenex-suite","en\u002F01.getting-started\u002F1.what-is-qenex-suite",{"title":24,"path":25,"stem":26,"navTitle":24},"What is QInsight","\u002Fen\u002Fgetting-started\u002Fwhat-is-qinsight","en\u002F01.getting-started\u002F2.what-is-qinsight",{"title":28,"path":29,"stem":30,"navTitle":28},"Installation","\u002Fen\u002Fgetting-started\u002Finstallation","en\u002F01.getting-started\u002F3.installation",{"title":32,"path":33,"stem":34,"navTitle":35},"The QInsight user interface","\u002Fen\u002Fgetting-started\u002Fthe-qinsight-interface","en\u002F01.getting-started\u002F4.the-qinsight-interface","User interface",{"title":37,"path":38,"stem":39,"navTitle":37},"Licensing","\u002Fen\u002Fgetting-started\u002Flicensing","en\u002F01.getting-started\u002F5.licensing",false,{"title":42,"navTitle":15,"path":43,"stem":44,"children":45,"page":40},"First Project","\u002Fen\u002Ffirst-project","en\u002F02.first-project",[46,50,54],{"title":47,"path":48,"stem":49,"navTitle":47},"Create a project","\u002Fen\u002Ffirst-project\u002Fcreate-a-project","en\u002F02.first-project\u002F1.create-a-project",{"title":51,"path":52,"stem":53,"navTitle":51},"Project structure","\u002Fen\u002Ffirst-project\u002Fproject-structure","en\u002F02.first-project\u002F2.project-structure",{"title":55,"path":56,"stem":57,"navTitle":55},"Project password","\u002Fen\u002Ffirst-project\u002Fproject-password","en\u002F02.first-project\u002F3.project-password",{"title":59,"navTitle":15,"path":60,"stem":61,"children":62,"page":40},"Connecting a Device","\u002Fen\u002Fconnecting-a-device","en\u002F03.connecting-a-device",[63,67,71],{"title":64,"path":65,"stem":66,"navTitle":64},"Add a driver","\u002Fen\u002Fconnecting-a-device\u002Fadd-a-driver","en\u002F03.connecting-a-device\u002F1.add-a-driver",{"title":68,"path":69,"stem":70,"navTitle":68},"Add a protocol","\u002Fen\u002Fconnecting-a-device\u002Fadd-a-protocol","en\u002F03.connecting-a-device\u002F2.add-a-protocol",{"title":72,"path":73,"stem":74,"navTitle":75},"Link a driver and a protocol","\u002Fen\u002Fconnecting-a-device\u002Flink-driver-and-protocol","en\u002F03.connecting-a-device\u002F3.link-driver-and-protocol","Linking",{"title":77,"navTitle":15,"path":78,"stem":79,"children":80,"page":40},"Variables","\u002Fen\u002Fvariables","en\u002F04.variables",[81,85,90,94,99],{"title":82,"path":83,"stem":84,"navTitle":82},"What is a variable","\u002Fen\u002Fvariables\u002Fwhat-is-a-variable","en\u002F04.variables\u002F1.what-is-a-variable",{"title":86,"path":87,"stem":88,"navTitle":89},"Conversion and presentation","\u002Fen\u002Fvariables\u002Fconversion-and-presentation","en\u002F04.variables\u002F2.conversion-and-presentation","Conversion & presentation",{"title":91,"path":92,"stem":93,"navTitle":91},"Add a variable","\u002Fen\u002Fvariables\u002Fadd-a-variable","en\u002F04.variables\u002F3.add-a-variable",{"title":95,"path":96,"stem":97,"navTitle":98},"Matrix variable (array, curve, map)","\u002Fen\u002Fvariables\u002Fmatrix-variable","en\u002F04.variables\u002F4.matrix-variable","Matrix variable",{"title":100,"path":101,"stem":102,"navTitle":100},"Events","\u002Fen\u002Fvariables\u002Fevents","en\u002F04.variables\u002F5.events",{"title":104,"navTitle":15,"path":105,"stem":106,"children":107,"page":40},"Visualization","\u002Fen\u002Fvisualization","en\u002F05.visualization",[108,113,118,122,127,132,137,142,147,152],{"title":109,"path":110,"stem":111,"navTitle":112},"Create a workspace","\u002Fen\u002Fvisualization\u002Fcreate-a-workspace","en\u002F05.visualization\u002F1.create-a-workspace","Workspace",{"title":114,"path":115,"stem":116,"navTitle":117},"Writing values to the device","\u002Fen\u002Fvisualization\u002Fwrite-to-device","en\u002F05.visualization\u002F10.write-to-device","Writing to the device",{"title":119,"path":120,"stem":121,"navTitle":119},"Add a control","\u002Fen\u002Fvisualization\u002Fadd-a-control","en\u002F05.visualization\u002F2.add-a-control",{"title":123,"path":124,"stem":125,"navTitle":126},"Bind a control to a variable","\u002Fen\u002Fvisualization\u002Fbind-a-control","en\u002F05.visualization\u002F3.bind-a-control","Bind a control",{"title":128,"path":129,"stem":130,"navTitle":131},"Graph — signal time course","\u002Fen\u002Fvisualization\u002Fgraph-control","en\u002F05.visualization\u002F4.graph-control","Graph",{"title":133,"path":134,"stem":135,"navTitle":136},"XY Graph — signal versus signal","\u002Fen\u002Fvisualization\u002Fxy-graph-control","en\u002F05.visualization\u002F5.xy-graph-control","XY Graph",{"title":138,"path":139,"stem":140,"navTitle":141},"Gauge — instantaneous value indicator","\u002Fen\u002Fvisualization\u002Fgauge-control","en\u002F05.visualization\u002F6.gauge-control","Gauge",{"title":143,"path":144,"stem":145,"navTitle":146},"Single-Signal — a value with a caption","\u002Fen\u002Fvisualization\u002Fsignal-control","en\u002F05.visualization\u002F7.signal-control","Single-Signal",{"title":148,"path":149,"stem":150,"navTitle":151},"Watch Table — a table of variables","\u002Fen\u002Fvisualization\u002Fwatch-table-control","en\u002F05.visualization\u002F8.watch-table-control","Watch Table",{"title":153,"path":154,"stem":155,"navTitle":156},"Matrix control — maps and calibration","\u002Fen\u002Fvisualization\u002Fmatrix-control","en\u002F05.visualization\u002F9.matrix-control","Matrix control",{"title":158,"navTitle":15,"path":159,"stem":160,"children":161,"page":40},"Running and Monitoring","\u002Fen\u002Frunning","en\u002F06.running",[162,166],{"title":163,"path":164,"stem":165,"navTitle":163},"Start and stop","\u002Fen\u002Frunning\u002Fstart-and-stop","en\u002F06.running\u002F1.start-and-stop",{"title":167,"path":168,"stem":169,"navTitle":170},"Watching live data","\u002Fen\u002Frunning\u002Fwatching-live-data","en\u002F06.running\u002F2.watching-live-data","Live data",{"title":172,"navTitle":15,"path":173,"stem":174,"children":175,"page":40},"Logging and Replay","\u002Fen\u002Flogging-and-replay","en\u002F07.logging-and-replay",[176,180,185],{"title":177,"path":178,"stem":179,"navTitle":177},"Logging data","\u002Fen\u002Flogging-and-replay\u002Flogging-data","en\u002F07.logging-and-replay\u002F1.logging-data",{"title":181,"path":182,"stem":183,"navTitle":184},"Replaying a log","\u002Fen\u002Flogging-and-replay\u002Freplaying-a-log","en\u002F07.logging-and-replay\u002F2.replaying-a-log","Replay",{"title":186,"path":187,"stem":188,"navTitle":189},"Exporting data","\u002Fen\u002Flogging-and-replay\u002Fexporting-data","en\u002F07.logging-and-replay\u002F3.exporting-data","Export",{"title":191,"navTitle":15,"path":192,"stem":193,"children":194,"page":40},"Python Scripts","\u002Fen\u002Fpython-scripts","en\u002F08.python-scripts",[195,199,203,207],{"title":196,"path":197,"stem":198,"navTitle":12},"Scripts overview","\u002Fen\u002Fpython-scripts\u002Fscripts-overview","en\u002F08.python-scripts\u002F1.scripts-overview",{"title":200,"path":201,"stem":202,"navTitle":200},"Accessing variables","\u002Fen\u002Fpython-scripts\u002Faccessing-variables","en\u002F08.python-scripts\u002F2.accessing-variables",{"title":204,"path":205,"stem":206,"navTitle":204},"Example script","\u002Fen\u002Fpython-scripts\u002Fexample-script","en\u002F08.python-scripts\u002F3.example-script",{"title":208,"path":209,"stem":210,"navTitle":208},"CSV post-processing","\u002Fen\u002Fpython-scripts\u002Fcsv-post-processing","en\u002F08.python-scripts\u002F4.csv-post-processing",{"title":212,"navTitle":15,"path":213,"stem":214,"children":215,"page":40},"Custom extensions","\u002Fen\u002Fcustom-extensions","en\u002F09.custom-extensions",[216,220,224,228,233],{"title":217,"path":218,"stem":219,"navTitle":217},"Custom driver","\u002Fen\u002Fcustom-extensions\u002Fcustom-driver","en\u002F09.custom-extensions\u002F1.custom-driver",{"title":221,"path":222,"stem":223,"navTitle":221},"Custom protocol","\u002Fen\u002Fcustom-extensions\u002Fcustom-protocol","en\u002F09.custom-extensions\u002F2.custom-protocol",{"title":225,"path":226,"stem":227,"navTitle":225},"Custom Control","\u002Fen\u002Fcustom-extensions\u002Fcustom-control","en\u002F09.custom-extensions\u002F3.custom-control",{"title":229,"path":230,"stem":231,"navTitle":232},"Complete example — ISS position","\u002Fen\u002Fcustom-extensions\u002Fiss-example","en\u002F09.custom-extensions\u002F4.iss-example","Example ISS",{"title":234,"path":235,"stem":236,"navTitle":237},"Complete example — temperature sensor","\u002Fen\u002Fcustom-extensions\u002Ftemp-sensor-example","en\u002F09.custom-extensions\u002F5.temp-sensor-example","Example temp sensor",{"title":239,"navTitle":15,"path":240,"stem":241,"children":242,"page":40},"QFW SDK","\u002Fen\u002Fdevice-sdk","en\u002F10.device-sdk",[243,248,253,258,263,268,273,278],{"title":244,"path":245,"stem":246,"navTitle":247},"QFW SDK — introduction","\u002Fen\u002Fdevice-sdk\u002Fintroduction","en\u002F10.device-sdk\u002F1.introduction","Introduction",{"title":249,"path":250,"stem":251,"navTitle":252},"XCP in the QFW SDK","\u002Fen\u002Fdevice-sdk\u002Fxcp","en\u002F10.device-sdk\u002F2.xcp","XCP",{"title":254,"path":255,"stem":256,"navTitle":257},"Integration step by step: XCP on TCP with FreeRTOS + lwIP","\u002Fen\u002Fdevice-sdk\u002Fintegration-tcp","en\u002F10.device-sdk\u002F3.integration-tcp","Integration: XCP on TCP",{"title":259,"path":260,"stem":261,"navTitle":262},"XCP on classic CAN — what changes","\u002Fen\u002Fdevice-sdk\u002Fcan","en\u002F10.device-sdk\u002F4.can","XCP on classic CAN",{"title":264,"path":265,"stem":266,"navTitle":267},"Integration without an RTOS: XCP on TCP from the main loop","\u002Fen\u002Fdevice-sdk\u002Fbaremetal","en\u002F10.device-sdk\u002F5.baremetal","Integration without an RTOS",{"title":269,"path":270,"stem":271,"navTitle":272},"The engine contract","\u002Fen\u002Fdevice-sdk\u002Fengine-contract","en\u002F10.device-sdk\u002F6.engine-contract","Engine contract",{"title":274,"path":275,"stem":276,"navTitle":277},"Variable addresses for QInsight","\u002Fen\u002Fdevice-sdk\u002Fvariable-addresses","en\u002F10.device-sdk\u002F7.variable-addresses","Variable addresses",{"title":279,"path":280,"stem":281,"navTitle":282},"Troubleshooting the SDK integration","\u002Fen\u002Fdevice-sdk\u002Ftroubleshooting","en\u002F10.device-sdk\u002F8.troubleshooting","Troubleshooting",{"title":284,"navTitle":15,"path":285,"stem":286,"children":287,"page":40},"Reference","\u002Fen\u002Freference","en\u002F11.reference",[288,292,296,300],{"title":289,"path":290,"stem":291,"navTitle":289},"Drivers","\u002Fen\u002Freference\u002Fdrivers","en\u002F11.reference\u002F1.drivers",{"title":293,"path":294,"stem":295,"navTitle":293},"Protocols","\u002Fen\u002Freference\u002Fprotocols","en\u002F11.reference\u002F2.protocols",{"title":297,"path":298,"stem":299,"navTitle":297},"Controls","\u002Fen\u002Freference\u002Fcontrols","en\u002F11.reference\u002F3.controls",{"title":282,"path":301,"stem":302,"navTitle":282},"\u002Fen\u002Freference\u002Ftroubleshooting","en\u002F11.reference\u002F4.troubleshooting",{"title":304,"navTitle":15,"path":305,"stem":306,"children":307,"page":40},"Examples","\u002Fen\u002Fexamples","en\u002F12.examples",[308,312,317,322,327,331,335,339,343,347,352,357,362],{"title":309,"path":310,"stem":311,"navTitle":309},"Simulation: all signals","\u002Fen\u002Fexamples\u002Fsimulation-all-signals","en\u002F12.examples\u002F01.simulation-all-signals",{"title":313,"path":314,"stem":315,"navTitle":316},"Modbus RTU master over a serial line","\u002Fen\u002Fexamples\u002Fserial-modbus-master","en\u002F12.examples\u002F02.serial-modbus-master","Modbus RTU master",{"title":318,"path":319,"stem":320,"navTitle":321},"Modbus RTU slave with simulated sensors","\u002Fen\u002Fexamples\u002Fserial-modbus-slave","en\u002F12.examples\u002F03.serial-modbus-slave","Modbus RTU slave",{"title":323,"path":324,"stem":325,"navTitle":326},"Modbus TCP master over a TCP client","\u002Fen\u002Fexamples\u002Ftcp-client-modbus-master","en\u002F12.examples\u002F04.tcp-client-modbus-master","Modbus TCP master",{"title":328,"path":329,"stem":330,"navTitle":328},"Modbus TCP slave on the TCP Server","\u002Fen\u002Fexamples\u002Ftcp-server-modbus-slave","en\u002F12.examples\u002F05.tcp-server-modbus-slave",{"title":332,"path":333,"stem":334,"navTitle":332},"Bit field and a script","\u002Fen\u002Fexamples\u002Fbit-field-script","en\u002F12.examples\u002F08.bit-field-script",{"title":336,"path":337,"stem":338,"navTitle":336},"Two ECUs at once","\u002Fen\u002Fexamples\u002Ftwo-ecus","en\u002F12.examples\u002F09.two-ecus",{"title":340,"path":341,"stem":342,"navTitle":340},"ISS position live","\u002Fen\u002Fexamples\u002Fiss-live-tracking","en\u002F12.examples\u002F10.iss-live-tracking",{"title":344,"path":345,"stem":346,"navTitle":344},"Simulated thermometer","\u002Fen\u002Fexamples\u002Fsimul-temp-measure","en\u002F12.examples\u002F11.simul-temp-measure",{"title":348,"path":349,"stem":350,"navTitle":351},"JSON signals from a Python generator","\u002Fen\u002Fexamples\u002Fjson-signal-python","en\u002F12.examples\u002F12.json-signal-python","JSON signals from Python",{"title":353,"path":354,"stem":355,"navTitle":356},"Raw CAN frames from a Raspberry Pi","\u002Fen\u002Fexamples\u002Fraw-can-python","en\u002F12.examples\u002F13.raw-can-python","Raw CAN from a Raspberry Pi",{"title":358,"path":359,"stem":360,"navTitle":361},"XCP on TCP on a NUCLEO-H723ZG: measurement, stimulation and calibration maps","\u002Fen\u002Fexamples\u002Ftcp-client-xcp-nucleo-maps","en\u002F12.examples\u002F14.tcp-client-xcp-nucleo-maps","XCP on TCP on NUCLEO-H723ZG",{"title":363,"path":364,"stem":365,"navTitle":366},"XCP on CAN on a NUCLEO-H723ZG: measurement, stimulation and calibration maps","\u002Fen\u002Fexamples\u002Fcan-xcp-nucleo-maps","en\u002F12.examples\u002F15.can-xcp-nucleo-maps","XCP on CAN on NUCLEO-H723ZG",{"id":368,"title":313,"body":369,"description":1190,"extension":1191,"meta":1192,"navTitle":316,"navigation":1193,"path":314,"seo":1194,"stem":315,"__hash__":1195},"docs_en\u002Fen\u002F12.examples\u002F02.serial-modbus-master.md",{"type":370,"value":371,"toc":1175},"minimark",[372,376,388,393,412,447,451,470,473,504,508,513,516,623,676,709,712,727,730,763,885,906,936,939,946,1036,1039,1043,1123,1127],[373,374,313],"h1",{"id":375},"modbus-rtu-master-over-a-serial-line",[377,378,379,380,384,385,387],"p",{},"You will find the project ",[381,382,383],"code",{},"Qenex_Serial_ModbusMaster_HoldingRegisters.qproj","\nin the ",[381,386,304],{}," folder next to QInsight.exe.",[389,390,392],"h2",{"id":391},"what-the-example-shows","What the example shows",[377,394,395,396,399,400,403,404,407,408,411],{},"QInsight acts here as a ",[397,398,316],"strong",{},": the ",[397,401,402],{},"Serial Port (COM)","\ndriver with the ",[397,405,406],{},"Modbus Master"," protocol in ",[381,409,410],{},"rtu"," mode reads holding\nregisters from the slave with address 2 once a second. The example\nshows:",[413,414,415,419,429,435,441],"ul",{},[416,417,418],"li",{},"the driver and protocol settings exactly as entered in Project\nConfiguration,",[416,420,421,424,425,428],{},[397,422,423],{},"scalar variables in holding registers"," (",[381,426,427],{},"ushort",", one register per\nvariable) with a linear conversion and a unit,",[416,430,431,434],{},[397,432,433],{},"a Matrix variable transferred as one contiguous register block"," —\naxes and data cells of a map in a single request,",[416,436,437,440],{},[397,438,439],{},"writing to the device"," from the Watch Table (scalars) and from the\nMatrix control (map cells),",[416,442,443,446],{},[397,444,445],{},"driver reconnection"," after the converter is unplugged and the\nmaster resuming on its own.",[389,448,450],{"id":449},"what-you-need","What you need",[377,452,453,454,457,458,461,462,465,466,469],{},"The counterpart is any ",[397,455,456],{},"Modbus RTU slave with unit id 2"," that offers\nholding registers at addresses 0–12. Without hardware a simulator will do,\ne.g. ",[397,459,460],{},"pyModSlave",": a pair of virtual COM ports (QInsight on one end, the\nsimulator on the other) and, in the simulator, ",[397,463,464],{},"RTU",", ",[397,467,468],{},"slave id 2",",\n9600 Bd, 8N1, holding registers starting at address 0. With a real device\na USB\u002FRS-485 converter is enough.",[377,471,472],{},"Before starting, adapt in Project Configuration what is specific to your\ncomputer and device:",[413,474,475,485,498],{},[416,476,477,480,481,484],{},[381,478,479],{},"port"," in the driver settings — the project has ",[381,482,483],{},"COM6","; enter the port\nof the converter or your end of the virtual pair,",[416,486,487,490,491,465,494,497],{},[381,488,489],{},"baudRate"," (and ",[381,492,493],{},"parity",[381,495,496],{},"stopBits"," if needed) to match the device —\nthe project expects 9600 Bd, 8N1,",[416,499,500,503],{},[381,501,502],{},"unitId"," in the protocol settings if the slave is not at address 2.",[389,505,507],{"id":506},"the-project","The project",[509,510,512],"h3",{"id":511},"drivers-and-protocols","Drivers and protocols",[377,514,515],{},"One driver + protocol pair handles the communication. The settings are\nstored exactly like this:",[517,518,519,532],"table",{},[520,521,522],"thead",{},[523,524,525,529],"tr",{},[526,527,528],"th",{},"Serial Port (COM) driver",[526,530,531],{},"Meaning",[533,534,535,549,559,569,579,589,599,609],"tbody",{},[523,536,537,543],{},[538,539,540],"td",{},[381,541,542],{},"port=COM6",[538,544,545,546],{},"COM port name — ",[397,547,548],{},"change it for your computer",[523,550,551,556],{},[538,552,553],{},[381,554,555],{},"baudRate=9600",[538,557,558],{},"communication speed",[523,560,561,566],{},[538,562,563],{},[381,564,565],{},"dataBits=8",[538,567,568],{},"number of data bits",[523,570,571,576],{},[538,572,573],{},[381,574,575],{},"parity=none",[538,577,578],{},"no parity",[523,580,581,586],{},[538,582,583],{},[381,584,585],{},"stopBits=1",[538,587,588],{},"one stop bit",[523,590,591,596],{},[538,592,593],{},[381,594,595],{},"handshake=none",[538,597,598],{},"no flow control",[523,600,601,606],{},[538,602,603],{},[381,604,605],{},"reconnectDelayMs=2000",[538,607,608],{},"delay before reopening the port after a failure",[523,610,611,616],{},[538,612,613],{},[381,614,615],{},"reconnectAttempts=5",[538,617,618,619,622],{},"after five consecutive failed attempts the driver stops (the default is ",[381,620,621],{},"-1"," = forever)",[517,624,625,634],{},[520,626,627],{},[523,628,629,632],{},[526,630,631],{},"Modbus Master (RTU\u002FTCP) protocol",[526,633,531],{},[533,635,636,646,656,666],{},[523,637,638,643],{},[538,639,640],{},[381,641,642],{},"mode=rtu",[538,644,645],{},"RTU framing (CRC16) for a serial line",[523,647,648,653],{},[538,649,650],{},[381,651,652],{},"unitId=2",[538,654,655],{},"address of the slave the master talks to",[523,657,658,663],{},[538,659,660],{},[381,661,662],{},"requestTimeoutMs=2000",[538,664,665],{},"response timeout per request",[523,667,668,673],{},[538,669,670],{},[381,671,672],{},"requestRetries=8",[538,674,675],{},"request repetitions after a timeout, on top of the first attempt (up to 9 transmissions)",[377,677,678,679,424,682,685,686,689,690,693,694,697,698,701,702,424,705,708],{},"The project also contains two drivers the Modbus example does not need:\n",[397,680,681],{},"Data Log Recorder",[381,683,684],{},"file=DataLogs;append=true;flushOnWrite=false;reorderBufferMs=500",")\nis enabled and records ",[381,687,688],{},"EngTorque"," and ",[381,691,692],{},"Torque"," into a ",[381,695,696],{},".qilog"," file in\nthe ",[381,699,700],{},"DataLogs"," folder next to the project on every run (the matrix is not\nlogged); ",[397,703,704],{},"Data Log Replay",[381,706,707],{},"file=DataLogs\\values.qilog;mode=realtime;speed=1;loop=false",")\nis disabled. If you do not want logging, disable the Data Log Recorder\ndriver.",[509,710,100],{"id":711},"events",[377,713,714,715,718,719,722,723,726],{},"The project has a single periodic event ",[381,716,717],{},"Pool500ms"," with a period of\n",[397,720,721],{},"1000 ms"," (the name does not match the actual period; the ",[397,724,725],{},"Period","\nvalue is what counts). All three variables are bound to it, so once a\nsecond the master sends three separate FC03 requests — one per variable.",[509,728,77],{"id":729},"variables",[377,731,732,733,736,737,739,740,743,744,747,748,465,751,754,755,758,759,762],{},"All variables live in the ",[381,734,735],{},"\u002FModbus"," namespace, are of type ",[381,738,427],{}," and\nshare the ",[381,741,742],{},"ModbusSImple"," presentation: the ",[381,745,746],{},"Pass-through"," conversion is\nlinear with ",[381,749,750],{},"multiplier=0.01",[381,752,753],{},"offset=0"," (engineering value = raw × 0.01,\nso raw 12345 is shown as 123.450), unit ",[381,756,757],{},"Nm",", format ",[381,760,761],{},"{0:F3}",", range\n0–65535.",[517,764,765,790],{},[520,766,767],{},[523,768,769,772,775,778,781,784,787],{},[526,770,771],{},"Variable",[526,773,774],{},"Type",[526,776,777],{},"Register",[526,779,780],{},"Address",[526,782,783],{},"Direction",[526,785,786],{},"Event",[526,788,789],{},"Presentation",[533,791,792,824,853],{},[523,793,794,799,804,807,810,815,819],{},[538,795,796,798],{},[381,797,688],{}," (Engine torque)",[538,800,801,802],{},"scalar ",[381,803,427],{},[538,805,806],{},"holding",[538,808,809],{},"0",[538,811,812],{},[381,813,814],{},"readWrite",[538,816,817],{},[381,818,717],{},[538,820,821,823],{},[381,822,742],{}," (× 0.01, Nm)",[523,825,826,831,835,837,840,845,849],{},[538,827,828,830],{},[381,829,692],{}," (Torque)",[538,832,801,833],{},[381,834,427],{},[538,836,806],{},[538,838,839],{},"1",[538,841,842],{},[381,843,844],{},"read",[538,846,847],{},[381,848,717],{},[538,850,851,823],{},[381,852,742],{},[523,854,855,861,867,869,872,876,880],{},[538,856,857,860],{},[381,858,859],{},"Drivability"," (Drivability)",[538,862,863,864,866],{},"matrix ",[381,865,427],{},", 3 × 2",[538,868,806],{},[538,870,871],{},"2",[538,873,874],{},[381,875,814],{},[538,877,878],{},[381,879,717],{},[538,881,882,884],{},[381,883,742],{}," on axes and data",[377,886,887,888,891,892,894,895,465,898,901,902,905],{},"Comm params of the scalars: ",[381,889,890],{},"registerType=\"holdingRegister\";address=\"0\";wordOrder=\"big\";direction=\"readWrite\";eventRef=\"Pool500ms\"","\n(for ",[381,893,692],{}," ",[381,896,897],{},"address=\"1\"",[381,899,900],{},"direction=\"read\"","). ",[381,903,904],{},"wordOrder"," has no\neffect on single-register values.",[377,907,908,910,911,915,916,919,920,923,924,927,928,932,933,935],{},[381,909,859],{}," is a ",[912,913,98],"a",{"href":914},"\u002Fvariables\u002Fmatrix-variable"," — a map\nwith an X axis ",[381,917,918],{},"Speed [RPM]"," (3 points), a Y axis ",[381,921,922],{},"Temp. [K]"," (2 points)\nand 6 data cells, 11 values = 22 bytes in total, Endianness ",[381,925,926],{},"be",". The\nModbus Master transfers it as a\n",[912,929,931],{"href":930},"\u002Freference\u002Fprotocols#matrix-variables","contiguous block"," of 11 holding\nregisters starting at address 2 (addresses 2–12); a read is a single FC03\nrequest, a write sends only the changed cells. The ",[381,934,742],{},"\npresentation is assigned to both axes as well, so the axis values are\ndisplayed with the Nm unit.",[509,937,112],{"id":938},"workspace",[377,940,941,942,945],{},"One workspace (",[381,943,944],{},"Workspace6904",") with five controls:",[517,947,948,960],{},[520,949,950],{},[523,951,952,955,957],{},[526,953,954],{},"Control",[526,956,77],{},[526,958,959],{},"Note",[533,961,962,980,995,1005,1020],{},[523,963,964,969,977],{},[538,965,966],{},[912,967,131],{"href":968},"\u002Fvisualization\u002Fgraph-control",[538,970,971,973,974,976],{},[381,972,688],{}," (red, left axis), ",[381,975,692],{}," (blue, right axis)",[538,978,979],{},"10 s window, both axes auto-scale",[523,981,982,988,992],{},[538,983,984],{},[912,985,987],{"href":986},"\u002Fvisualization\u002Fsignal-control","Signal",[538,989,990],{},[381,991,688],{},[538,993,994],{},"250 ms refresh",[523,996,997,999,1003],{},[538,998,987],{},[538,1000,1001],{},[381,1002,692],{},[538,1004,994],{},[523,1006,1007,1013,1017],{},[538,1008,1009],{},[912,1010,1012],{"href":1011},"\u002Fvisualization\u002Fmatrix-control","Matrix",[538,1014,1015],{},[381,1016,859],{},[538,1018,1019],{},"AutoRead, cell written on Enter (WriteOnEnter)",[523,1021,1022,1027,1033],{},[538,1023,1024],{},[912,1025,151],{"href":1026},"\u002Fvisualization\u002Fwatch-table-control",[538,1028,1029,465,1031],{},[381,1030,692],{},[381,1032,688],{},[538,1034,1035],{},"columns Name, Value, Unit, Time, Write",[377,1037,1038],{},"No control is saved in write mode — writing is switched on at runtime.",[389,1040,1042],{"id":1041},"what-you-will-see-and-what-to-try","What you will see and what to try",[1044,1045,1046,1056,1079,1085],"ol",{},[416,1047,1048,1051,1052,1055],{},[397,1049,1050],{},"Reading."," Start the runtime (",[397,1053,1054],{},"Start","). The driver opens the COM\nport and the master starts reading registers 0, 1 and the block 2–12\nonce a second. Change holding register 0 or 1 in the simulator and\nwatch the value appear within a second in the graph, the Signal\ncontrol and the Watch Table — divided by one hundred and with Nm.",[416,1057,1058,1061,1062,1064,1065,1068,1069,1071,1072,1074,1075,1078],{},[397,1059,1060],{},"Writing a scalar."," In the Watch Table switch on write mode for the\n",[381,1063,688],{}," row (Write column), enter an engineering value such as\n",[381,1066,1067],{},"123.45"," and confirm. The master writes the raw value 12345 into\nregister 0 and you will see it in the simulator. ",[381,1070,692],{}," is ",[381,1073,844],{},"\nonly, so no write is offered for it. Details in\n",[912,1076,114],{"href":1077},"\u002Fvisualization\u002Fwrite-to-device",".",[416,1080,1081,1084],{},[397,1082,1083],{},"Writing a map cell."," Switch the Matrix control to write mode,\noverwrite a cell or an axis point and confirm with Enter — only the\naffected register of the 2–12 block goes to the slave.",[416,1086,1087,1090,1091,1094,1095,1098,1099,1102,1103,1105,1106,1110,1111,1114,1115,1117,1118,689,1120,1122],{},[397,1088,1089],{},"Connection loss."," Unplug the USB converter (or close the virtual\nport) while running. The driver enters the ",[397,1092,1093],{},"Faulted"," state, the\nmaster pauses its requests and the driver tries to reopen the port\nevery 2 s, at most five times. Plug the converter back within those\nroughly ten seconds — the driver opens the port, the master resumes\nreading on its own and the graph only shows a gap. Once the limit is\nexhausted the driver ends in the ",[397,1096,1097],{},"Stopped"," state with the error\n",[381,1100,1101],{},"gave up after 5 reconnect attempt(s)"," and you restart it with the\n",[397,1104,1054],{}," button in its properties (see\n",[912,1107,1109],{"href":1108},"\u002Frunning\u002Fstart-and-stop#driver-states-and-the-start-button","Driver states and the Start button",").\nSet ",[381,1112,1113],{},"reconnectAttempts=-1"," for endless retries. When it is the slave\nthat does not answer (wrong ",[381,1116,502],{},", simulator closed), the port stays\nopen and only the protocol reports the error through its timeout —\nwith ",[381,1119,662],{},[381,1121,672],{}," it waits up to\n9 × 2 s for a single request.",[389,1124,1126],{"id":1125},"related-chapters","Related chapters",[413,1128,1129,1140,1150,1161,1169],{},[416,1130,1131,1135,1136,1078],{},[912,1132,1134],{"href":1133},"\u002Freference\u002Fdrivers#serial-port-com","Reference — Serial Port (COM)","\nand ",[912,1137,1139],{"href":1138},"\u002Freference\u002Fdrivers#reconnection","Reconnection",[416,1141,1142,1146,1147,1078],{},[912,1143,1145],{"href":1144},"\u002Freference\u002Fprotocols#modbus-master-rtutcp","Reference — Modbus Master (RTU\u002FTCP)","\nincluding ",[912,1148,1149],{"href":930},"Matrix variables",[416,1151,1152,1155,1156,465,1159,1078],{},[912,1153,86],{"href":1154},"\u002Fvariables\u002Fconversion-and-presentation",",\n",[912,1157,100],{"href":1158},"\u002Fvariables\u002Fevents",[912,1160,98],{"href":914},[416,1162,1163,1155,1165,1155,1167,1078],{},[912,1164,151],{"href":1026},[912,1166,156],{"href":1011},[912,1168,114],{"href":1077},[416,1170,1171,1174],{},[912,1172,177],{"href":1173},"\u002Flogging-and-replay\u002Flogging-data"," — what the enabled\nData Log Recorder does.",{"title":1176,"searchDepth":1177,"depth":1177,"links":1178},"",3,[1179,1181,1182,1188,1189],{"id":391,"depth":1180,"text":392},2,{"id":449,"depth":1180,"text":450},{"id":506,"depth":1180,"text":507,"children":1183},[1184,1185,1186,1187],{"id":511,"depth":1177,"text":512},{"id":711,"depth":1177,"text":100},{"id":729,"depth":1177,"text":77},{"id":938,"depth":1177,"text":112},{"id":1041,"depth":1180,"text":1042},{"id":1125,"depth":1180,"text":1126},"A ready-made project with the Serial Port driver and the Modbus Master protocol — two holding registers and a matrix read from an RTU slave, writes from the Watch Table and Matrix controls, reconnection after the converter is unplugged.","md",{},true,{"title":313,"description":1190},"xXkpA9b43MCB29eELBWBRMC3swinGhhmb7_Mtd30dZ0",[1197,1198],{"title":309,"path":310,"stem":311,"navTitle":309,"children":-1},{"title":318,"path":319,"stem":320,"navTitle":321,"children":-1},1791554568268]