[{"data":1,"prerenderedAt":1263},["ShallowReactive",2],{"blog-\u002Fblog\u002F2026\u002F03\u002Fhow-to-connect-to-twincat-using-ads":3},{"id":4,"title":5,"body":6,"description":12,"extension":1252,"meta":1253,"navigation":1258,"path":1259,"seo":1260,"stem":1261,"__hash__":1262},"blog\u002Fblog\u002F2026\u002F03\u002Fhow-to-connect-to-twincat-using-ads.md","How to Connect to Beckhoff TwinCAT PLC Using ADS (2026)",{"type":7,"value":8,"toc":1232},"minimark",[9,13,16,25,30,33,76,87,91,94,106,120,123,127,134,153,156,168,178,190,195,206,221,234,335,340,351,358,362,397,400,407,411,416,446,485,491,500,553,559,577,589,607,614,620,624,627,671,677,699,702,708,712,715,760,766,779,782,787,791,794,824,830,875,878,883,887,970,973,976,981,994,1001,1005,1035,1039,1055,1059,1074,1082,1087,1093,1107,1111,1114,1137,1143,1147,1162,1172,1187,1190,1205,1209,1212,1218,1221,1228],[10,11,12],"p",{},"Beckhoff TwinCAT is one of the most widely deployed PLC platforms in industrial automation. ADS, its native communication protocol, gives you direct read and write access to PLC variables without additional licensing or middleware, and connecting from FlowFuse means tapping into that same channel TwinCAT uses internally.",[10,14,15],{},"The challenge is usually not the tooling. It is the routing layer. AMS Net IDs, route tables, firewall rules. Get any of those wrong and ADS fails without telling you why. This guide covers the routing first, before touching a single FlowFuse node, because that is where most people get stuck.",[10,17,18,19,24],{},"By the end you will have live TwinCAT variables flowing into ",[20,21,23],"a",{"href":22},"\u002F","FlowFuse",".",[26,27,29],"h2",{"id":28},"prerequisites","Prerequisites",[10,31,32],{},"Before you begin, make sure you have the following in place:",[34,35,36,40,54,57,60,67,70,73],"ul",{},[37,38,39],"li",{},"TwinCAT 3.1 runtime running on a Beckhoff IPC",[37,41,42,43,49,50,24],{},"FlowFuse running on an edge device with network access to the TwinCAT machine. If you don't have an account yet, ",[20,44,48],{"href":45,"rel":46},"https:\u002F\u002Fapp.flowfuse.com\u002Faccount\u002Fcreate",[47],"nofollow","sign up"," to get started, then ",[20,51,53],{"href":52},"\u002Fblog\u002F2025\u002F09\u002Finstalling-node-red\u002F","follow this guide to quickly run a FlowFuse instance on your edge device",[37,55,56],{},"Both devices on the same network",[37,58,59],{},"Port 48898 open between the two devices",[37,61,62,66],{},[20,63,65],{"href":64},"#enable-symbol-creation","Symbol creation"," enabled on PlcTask so variables are accessible by name over ADS",[37,68,69],{},"PLC logged in and deployed on port 851",[37,71,72],{},"PLC in Run mode — the TwinCAT system tray icon must be green",[37,74,75],{},"Symbol paths of the variables you want to read or write, available from whoever wrote the PLC program",[77,78,79],"blockquote",{},[10,80,81,82,86],{},"If you don't have a real PLC available and want to follow along with a test setup, see\n",[20,83,85],{"href":84},"#setting-up-a-test-plc","Setting Up a Test PLC"," at the end of this guide before continuing.",[26,88,90],{"id":89},"what-is-ads-and-why-it-matters","What is ADS and Why It Matters",[10,92,93],{},"ADS, Automation Device Specification, is not an integration layer Beckhoff added for external tools. It is the internal communication backbone of the TwinCAT runtime itself. The same protocol TwinCAT XAE uses when you go online with a PLC, the same one the HMI uses to read variables, the same one the NC task uses to talk to the PLC task. When you connect from FlowFuse, you are using that same channel.",[10,95,96,97,101,102,105],{},"Every TwinCAT device has an AMS Net ID. It looks like an IP address with two extra octets: ",[98,99,100],"code",{},"10.68.82.232.1.1",". The first four typically match the device IP, the last two are almost always ",[98,103,104],{},"1.1"," by convention. This is how the ADS router identifies devices on the network, and it is what you will configure in every connection you make from FlowFuse.",[10,107,108,109,112,113,115,116,119],{},"Within a device, different TwinCAT components are reachable on different ADS ports. The PLC runtime listens on port ",[98,110,111],{},"851"," by default. If your machine runs multiple PLC tasks, each task gets its own port: the first task is ",[98,114,111],{},", the second is ",[98,117,118],{},"852",", and so on. Check with the controls engineer which port corresponds to the task containing your variables.",[10,121,122],{},"Three things cause silent failures: wrong AMS Net ID, missing route, blocked port 48898. ADS gives you nothing when any of these are wrong. No error, no timeout message, just silence. That is why we cover routing before touching a single FlowFuse node.",[26,124,126],{"id":125},"configuring-ads-routes","Configuring ADS Routes",[10,128,129,130,133],{},"TwinCAT will not accept an ADS connection from an unknown host. Every external device that needs to connect must be explicitly trusted in TwinCAT's route table. This is stored in a file called ",[98,131,132],{},"StaticRoutes.xml"," on the TwinCAT machine.",[10,135,136,137,141,142,145,146,148,149,152],{},"TwinCAT provides a route manager in the system tray under ",[138,139,140],"strong",{},"Router > Edit Routes",". However it does not expose the Flags setting, which defaults to ",[98,143,144],{},"64"," and will silently block connections from non-Windows devices such as Linux or Mac based edge devices. Editing ",[98,147,132],{}," directly is the only way to set Flags to ",[98,150,151],{},"0",", which allows connections from any trusted device on your network.",[10,154,155],{},"Before adding the route you need two pieces of information:",[34,157,158,161],{},[37,159,160],{},"The IP address of your FlowFuse edge device",[37,162,163,164,167],{},"The AMS Net ID you will assign to it, which is the IP address with ",[98,165,166],{},".1.1"," appended",[10,169,170,171,174,175,24],{},"For example if your FlowFuse device IP is ",[98,172,173],{},"10.68.82.101",", its AMS Net ID is ",[98,176,177],{},"10.68.82.101.1.1",[77,179,180],{},[10,181,182,185,186,189],{},[138,183,184],{},"Important:"," Your FlowFuse edge device must be on the same network as the interface TwinCAT's AMS Net ID is bound to. TwinCAT binds its AMS Net ID to a specific network interface on startup. If your machine has multiple network interfaces, confirm which IP the AMS Net ID uses — you can find it by right clicking the TwinCAT tray icon and selecting ",[138,187,188],{},"About TwinCAT System",". Your FlowFuse device must be reachable on that same network, otherwise the ADS handshake will fail even if port 48898 is open.",[10,191,192],{},[138,193,194],{},"Edit StaticRoutes.xml:",[77,196,197],{},[10,198,199,200,203,204,24],{},"If you do not have direct access to the TwinCAT machine, ask the controls engineer or machine builder to make this change. Share this section with them so they know exactly what needs to be set, particularly the ",[98,201,202],{},"Flags"," value of ",[98,205,151],{},[77,207,208],{},[10,209,210,213,214,216,217,220],{},[138,211,212],{},"Warning:"," The PowerShell command below overwrites the entire ",[98,215,132],{}," file. If the TwinCAT machine already has existing routes configured, back up the file before running this command or add your route entry manually inside the existing ",[98,218,219],{},"\u003CRemoteConnections>"," block instead.",[222,223,224,227],"ol",{},[37,225,226],{},"On the TwinCAT machine open PowerShell as administrator",[37,228,229,230,233],{},"Run the following command, replacing ",[98,231,232],{},"YOUR_EDGE_DEVICE_IP"," with the actual IP of your FlowFuse device:",[235,236,241],"pre",{"className":237,"code":238,"language":239,"meta":240,"style":240},"language-powershell shiki shiki-themes github-light github-dark","$xml = @\"\n\u003C?xml version=\"1.0\"?>\n\u003CTcConfig xmlns:xsi=\"http:\u002F\u002Fwww.w3.org\u002F2001\u002FXMLSchema-instance\">\n  \u003CRemoteConnections>\n    \u003CRoute>\n      \u003CName>flowfuse-edge\u003C\u002FName>\n      \u003CAddress>YOUR_EDGE_DEVICE_IP\u003C\u002FAddress>\n      \u003CNetId>YOUR_EDGE_DEVICE_IP.1.1\u003C\u002FNetId>\n      \u003CType>TCP_IP\u003C\u002FType>\n      \u003CFlags>0\u003C\u002FFlags>\n    \u003C\u002FRoute>\n  \u003C\u002FRemoteConnections>\n\u003C\u002FTcConfig>\n\"@\n$xml | Set-Content \"C:\\Program Files (x86)\\Beckhoff\\TwinCAT\\3.1\\Target\\StaticRoutes.xml\"\n","powershell","",[98,242,243,251,257,263,269,275,281,287,293,299,305,311,317,323,329],{"__ignoreMap":240},[244,245,248],"span",{"class":246,"line":247},"line",1,[244,249,250],{},"$xml = @\"\n",[244,252,254],{"class":246,"line":253},2,[244,255,256],{},"\u003C?xml version=\"1.0\"?>\n",[244,258,260],{"class":246,"line":259},3,[244,261,262],{},"\u003CTcConfig xmlns:xsi=\"http:\u002F\u002Fwww.w3.org\u002F2001\u002FXMLSchema-instance\">\n",[244,264,266],{"class":246,"line":265},4,[244,267,268],{},"  \u003CRemoteConnections>\n",[244,270,272],{"class":246,"line":271},5,[244,273,274],{},"    \u003CRoute>\n",[244,276,278],{"class":246,"line":277},6,[244,279,280],{},"      \u003CName>flowfuse-edge\u003C\u002FName>\n",[244,282,284],{"class":246,"line":283},7,[244,285,286],{},"      \u003CAddress>YOUR_EDGE_DEVICE_IP\u003C\u002FAddress>\n",[244,288,290],{"class":246,"line":289},8,[244,291,292],{},"      \u003CNetId>YOUR_EDGE_DEVICE_IP.1.1\u003C\u002FNetId>\n",[244,294,296],{"class":246,"line":295},9,[244,297,298],{},"      \u003CType>TCP_IP\u003C\u002FType>\n",[244,300,302],{"class":246,"line":301},10,[244,303,304],{},"      \u003CFlags>0\u003C\u002FFlags>\n",[244,306,308],{"class":246,"line":307},11,[244,309,310],{},"    \u003C\u002FRoute>\n",[244,312,314],{"class":246,"line":313},12,[244,315,316],{},"  \u003C\u002FRemoteConnections>\n",[244,318,320],{"class":246,"line":319},13,[244,321,322],{},"\u003C\u002FTcConfig>\n",[244,324,326],{"class":246,"line":325},14,[244,327,328],{},"\"@\n",[244,330,332],{"class":246,"line":331},15,[244,333,334],{},"$xml | Set-Content \"C:\\Program Files (x86)\\Beckhoff\\TwinCAT\\3.1\\Target\\StaticRoutes.xml\"\n",[77,336,337],{},[10,338,339],{},"Note: In this example, TwinCAT 3.1 is installed. If you are using a different version, replace 3.1 with the version installed on your system. The installation path may also vary depending on your TwinCAT setup.",[222,341,342,348],{"start":259},[37,343,344,345,24],{},"Restart the TwinCAT router from the system tray by right clicking the TwinCAT icon and selecting ",[138,346,347],{},"Router > Restart",[37,349,350],{},"Open the Windows Firewall and confirm that port 48898 is allowed for inbound TCP connections.",[10,352,353,354,357],{},"After the router restarts, verify that port 48898 is reachable from your FlowFuse edge device by running ",[98,355,356],{},"nc -zv \u003Ctwincat-ip> 48898",". If the connection is refused, confirm the firewall rule was saved and that both devices are on the same subnet.",[26,359,361],{"id":360},"installing-node-red-contrib-ads-client-in-flowfuse","Installing node-red-contrib-ads-client in FlowFuse",[222,363,364,367,373,380,386,392],{},[37,365,366],{},"In your FlowFuse instance open the Node-RED editor",[37,368,369,370],{},"Click the hamburger menu in the top right and select ",[138,371,372],{},"Manage Palette",[37,374,375,376,379],{},"Go to the ",[138,377,378],{},"Install"," tab",[37,381,382,383],{},"Search for ",[98,384,385],{},"node-red-contrib-ads-client",[37,387,388,389,391],{},"Click ",[138,390,378],{}," and wait for it to complete",[37,393,388,394],{},[138,395,396],{},"Close",[10,398,399],{},"Once the installation is complete, a few nodes will appear in the right-hand palette under the TwinCAT ADS category.",[10,401,402],{},[403,404],"img",{"alt":405,"src":406},"TwinCAT ADS nodes available in the Node-RED palette after installing node-red-contrib-ads-client","\u002Fblog\u002F2026\u002F03\u002Fimages\u002Ftwincat-ads-nodes.png",[26,408,410],{"id":409},"connecting-to-twincat","Connecting to TwinCAT",[10,412,413],{},[138,414,415],{},"Add the connection node:",[222,417,418,425,428,439],{},[37,419,420,421,424],{},"In Node-RED drag an ",[138,422,423],{},"ADS – Connection Status"," node onto the canvas",[37,426,427],{},"Double click it to open the configuration",[37,429,430,431,434,435,438],{},"Next to the ",[138,432,433],{},"Connection"," field click ",[138,436,437],{},"+"," to create a new connection",[37,440,441,442,445],{},"In the ",[138,443,444],{},"Required Settings"," tab fill in the Target AMS Net ID and Target ADS Port:",[447,448,449,462],"table",{},[450,451,452],"thead",{},[453,454,455,459],"tr",{},[456,457,458],"th",{},"Field",[456,460,461],{},"Value",[463,464,465,476],"tbody",{},[453,466,467,471],{},[468,469,470],"td",{},"Target AMS Net ID",[468,472,473,474],{},"AMS Net ID of your TwinCAT machine, e.g. ",[98,475,100],{},[453,477,478,481],{},[468,479,480],{},"Target ADS Port",[468,482,483],{},[98,484,111],{},[10,486,487],{},[403,488],{"alt":489,"src":490},"Required settings tab showing Target AMS Net ID and Target ADS Port fields in the ADS connection configuration","\u002Fblog\u002F2026\u002F03\u002Fimages\u002FTwincat-config-required-fields.png",[222,492,493],{"start":271},[37,494,495,496,499],{},"Switch to the ",[138,497,498],{},"Optional Settings"," tab and fill in the network settings:",[447,501,502,510],{},[450,503,504],{},[453,505,506,508],{},[456,507,458],{},[456,509,461],{},[463,511,512,523,533,543],{},[453,513,514,517],{},[468,515,516],{},"Router Address",[468,518,519,520],{},"IP address of your TwinCAT machine, e.g. ",[98,521,522],{},"10.68.82.232",[453,524,525,528],{},[468,526,527],{},"Router TCP Port",[468,529,530],{},[98,531,532],{},"48898",[453,534,535,538],{},[468,536,537],{},"Local AMS Net ID",[468,539,540,541],{},"AMS Net ID of your FlowFuse edge device, e.g. ",[98,542,177],{},[453,544,545,548],{},[468,546,547],{},"Local ADS Port",[468,549,550],{},[98,551,552],{},"32750",[10,554,555],{},[403,556],{"alt":557,"src":558},"Optional settings tab showing Router Address, Router TCP Port, Local AMS Net ID and Local ADS Port fields","\u002Fblog\u002F2026\u002F03\u002Fimages\u002Ftwincat-config-optional-tab.png",[10,560,561,562,564,565,567,568,570,571,573,574,576],{},"The ",[138,563,516],{}," and ",[138,566,527],{}," allow the ADS client to reach the TwinCAT router over the network. The ",[138,569,537],{}," identifies your FlowFuse edge device inside the ADS routing system and must match the route configured in ",[98,572,132],{},". The ",[138,575,547],{}," defines the local ADS endpoint used by the client and normally does not need to be changed.",[77,578,579],{},[10,580,581,584,585,588],{},[138,582,583],{},"Note:"," If your TwinCAT system is in config mode or the PLC runtime takes time to initialize on startup, enable ",[138,586,587],{},"Allow Half Open"," in the connection settings. Without it the client performs a strict system state check on connect and will fail with ADS error 7 even if the router is reachable. With it enabled the client connects regardless and waits for the runtime to become ready.",[222,590,591,597,602],{"start":277},[37,592,388,593,596],{},[138,594,595],{},"Add"," to save the connection configuration",[37,598,388,599],{},[138,600,601],{},"Done",[37,603,388,604],{},[138,605,606],{},"Deploy",[10,608,609,610,613],{},"Within a few seconds the connection status node should show ",[138,611,612],{},"connected",", indicating that FlowFuse successfully established an ADS session with the TwinCAT runtime.",[10,615,616],{},[403,617],{"alt":618,"src":619},"ADS connection status node showing connected state in Node-RED","\u002Fblog\u002F2026\u002F03\u002Fimages\u002Fconnection-status.png",[26,621,623],{"id":622},"reading-plc-variables","Reading PLC Variables",[10,625,626],{},"With the connection working, reading a variable takes three nodes: an inject node to trigger the read, a read value node to fetch the value, and a debug node to see the output.",[222,628,629,635,638,642,647,650,656],{},[37,630,631,632,424],{},"Drag an ",[138,633,634],{},"inject",[37,636,637],{},"Double click it and leave the default settings so it triggers manually",[37,639,388,640],{},[138,641,601],{},[37,643,631,644,424],{},[138,645,646],{},"ADS - Read Value",[37,648,649],{},"Double click it to configure",[37,651,652,653,655],{},"Select your TwinCAT connection from the ",[138,654,433],{}," dropdown",[37,657,658,659,662,663,666,667,670],{},"Set the ",[138,660,661],{},"Variable name"," to the full symbol path of the variable you want to read. Symbol paths are always in the format ",[98,664,665],{},"ProgramName.VariableName",". If you are following along with the test PLC, use ",[98,668,669],{},"MAIN.temperature",". If you are connecting to a real PLC, use the symbol paths provided by the controls engineer.",[10,672,673],{},[403,674],{"alt":675,"src":676},"ADS Read Value node configuration showing variable name set to MAIN.temperature","\u002Fblog\u002F2026\u002F03\u002Fimages\u002Fads-read-value.png",[222,678,679,683,689,692,695],{"start":289},[37,680,388,681],{},[138,682,601],{},[37,684,685,686,424],{},"Drag a ",[138,687,688],{},"debug",[37,690,691],{},"Connect the inject node output to the read value node input",[37,693,694],{},"Connect the read value node output to the debug node input",[37,696,388,697],{},[138,698,606],{},[10,700,701],{},"Click the inject button. You should see the variable value appear in the debug panel.",[703,704],"lite-youtube",{"videoid":705,"style":706,"title":707},"wTRmgIyWLyk","width: 100%; aspect-ratio: 16\u002F9; background-image: url('\u002Fblog\u002F2026\u002F03\u002Fimages\u002Fads-read.png'); background-size: cover; background-position: center;","Reading TwinCAT PLC Variables with FlowFuse",[26,709,711],{"id":710},"subscribing-to-variable-changes","Subscribing to Variable Changes",[10,713,714],{},"Polling on a fixed timer works but is inefficient. For live data the better approach is to subscribe to variable changes. TwinCAT sends a new value to FlowFuse only when the value actually changes, which reduces unnecessary network traffic and gives you lower latency updates.",[222,716,717,722,724,728,737,751],{},[37,718,631,719,424],{},[138,720,721],{},"ADS - Subscribe Value",[37,723,649],{},[37,725,652,726,655],{},[138,727,433],{},[37,729,658,730,732,733,736],{},[138,731,661],{}," to the full symbol path of the variable you want to monitor. If you are following along with the test PLC, use ",[98,734,735],{},"MAIN.motorRunning"," — it toggles roughly once per second so you will see true and false values arriving in the debug panel without being overwhelmed.",[37,738,658,739,742,743,746,747,750],{},[138,740,741],{},"Subscription mode"," to ",[138,744,745],{},"On Change",". This tells the TwinCAT runtime to notify FlowFuse only when the variable value has actually changed, rather than pushing the value on every cycle regardless of whether it changed. If you need a value delivered at a fixed interval even when unchanged, use ",[138,748,749],{},"Cyclic"," instead.",[37,752,658,753,742,756,759],{},[138,754,755],{},"Cycle time",[98,757,758],{},"100"," milliseconds. This is how frequently TwinCAT checks for changes on its side.",[10,761,762],{},[403,763],{"alt":764,"src":765},"ADS Subscribe Value node configuration showing variable name, subscription mode set to On Change, and cycle time set to 100ms","\u002Fblog\u002F2026\u002F03\u002Fimages\u002Fads-subscribe.png",[222,767,768,772,775],{"start":283},[37,769,388,770],{},[138,771,601],{},[37,773,774],{},"Connect its output to a debug node",[37,776,388,777],{},[138,778,606],{},[10,780,781],{},"The debug node will now receive a message every time the variable value changes in the PLC, with no polling required from FlowFuse.",[703,783],{"videoid":784,"style":785,"title":786},"JYrzRXCHb9Q","width: 100%; aspect-ratio: 16\u002F9; background-image: url('\u002Fblog\u002F2026\u002F03\u002Fimages\u002Fads-subscribe-image.png'); background-size: cover; background-position: center;","Subscribing to TwinCAT PLC Variable Changes with FlowFuse",[26,788,790],{"id":789},"writing-to-plc-variables","Writing to PLC Variables",[10,792,793],{},"Writing back to the PLC closes the loop. This is useful for sending setpoints, commands, or reset signals from FlowFuse back to TwinCAT.",[222,795,796,801,803,806,814],{},[37,797,631,798,424],{},[138,799,800],{},"ADS - Write Value",[37,802,649],{},[37,804,805],{},"Select your TwinCAT connection",[37,807,658,808,810,811,24],{},[138,809,661],{}," to the full symbol path of the variable you want to write to. If you are following along with the test PLC, use ",[98,812,813],{},"MAIN.setpoint",[37,815,816,817,820,821,823],{},"Leave ",[138,818,819],{},"Automatically fill missing properties (autoFill)"," unchecked. This setting only applies when writing complex types such as structs or function blocks — it reads the current value from the PLC first and merges your changes on top so unspecified fields are not zeroed out. For a simple variable like ",[98,822,813],{}," it has no effect.",[10,825,826],{},[403,827],{"alt":828,"src":829},"ADS Write Value node configuration showing variable name set to MAIN.setpoint with autoFill unchecked","\u002Fblog\u002F2026\u002F03\u002Fimages\u002Fads-write.png",[222,831,832,836,840,861,865,868,872],{"start":277},[37,833,388,834],{},[138,835,601],{},[37,837,631,838,424],{},[138,839,634],{},[37,841,842,843,846,847,850,851,854,855,858,859,24],{},"Double click it and set the payload type to match the type of your PLC variable. The payload type must match what the PLC expects — a ",[138,844,845],{},"Number"," for INT or REAL, a ",[138,848,849],{},"boolean"," for BOOL, a ",[138,852,853],{},"string"," for STRING, and so on. If you are following along with the test PLC, ",[98,856,857],{},"setpoint"," is declared as INT so set the payload type to ",[138,860,845],{},[37,862,388,863],{},[138,864,601],{},[37,866,867],{},"Connect the inject node output to the write node input",[37,869,388,870],{},[138,871,606],{},[37,873,874],{},"Click the inject button to trigger the write",[10,876,877],{},"To verify the write worked, add a read value node for the same variable and check that the value updated in the debug panel.",[703,879],{"videoid":880,"style":881,"title":882},"f0GtEp6OA_M","width: 100%; aspect-ratio: 16\u002F9; background-image: url('\u002Fblog\u002F2026\u002F03\u002Fimages\u002Fads-write-image.png'); background-size: cover; background-position: center;","Writing to TwinCAT PLC Variables with FlowFuse",[26,884,886],{"id":885},"troubleshooting","Troubleshooting",[34,888,889,907,928,934,943,952,961],{},[37,890,891,894,895,897,898,900,901,903,904,906],{},[138,892,893],{},"Connection fails silently with no error","\nThe FlowFuse device IP is not in ",[98,896,132],{}," or ",[98,899,202],{}," is set to ",[98,902,144],{}," instead of ",[98,905,151],{},". Edit the file using the PowerShell command in the routing section, then restart the TwinCAT router.",[37,908,909,912,913,915,916,918,919,921,922,924,925,927],{},[138,910,911],{},"ADS error 7: Target machine not found","\nThe most common cause is that your FlowFuse device and the TwinCAT machine are not on the same network as the interface TwinCAT's AMS Net ID is bound to. Check the AMS Net ID in ",[138,914,188],{}," on the TwinCAT machine and confirm your FlowFuse device has an IP on that same subnet. Also confirm the FlowFuse device IP is in ",[98,917,132],{}," with ",[98,920,202],{}," set to ",[98,923,151],{},", and that the router was restarted after any changes. If the PLC runtime takes time to initialize on startup, enable ",[138,926,587],{}," in the connection node.",[37,929,930,933],{},[138,931,932],{},"Error: Connection to 127.0.0.1:48898 failed","\nThe Router Address field in the connection node is empty or incorrect. Open the connection node, set the Router Address to the TwinCAT machine IP, and redeploy.",[37,935,936,939,940,942],{},[138,937,938],{},"Error 1808: Symbol not found","\nThe variable name is wrong or does not exist in the PLC program. Double check the full symbol path including the program name prefix, for example ",[98,941,669],{},". If you are using the test PLC, make sure symbol creation is enabled in PlcTask and the PLC is in Run mode.",[37,944,945,948,949,951],{},[138,946,947],{},"Error 1804: Failed to get fingerprint","\nThe FlowFuse device IP is missing from ",[98,950,132],{}," or the TwinCAT router was not restarted after editing the file.",[37,953,954,957,958,960],{},[138,955,956],{},"Port 48898 not reachable","\nPort 48898 is blocked on the TwinCAT machine firewall or the two devices are not on the same network. Confirm the firewall rule is in place and test reachability with ",[98,959,356],{}," from your FlowFuse device.",[37,962,963,966,967,24],{},[138,964,965],{},"PLC variables not updating","\nThe PLC is not in Run mode. The TwinCAT system tray icon must be green. A blue icon means the runtime is stopped — right click the tray icon and select ",[138,968,969],{},"Restart TwinCAT (Run Mode)",[26,971,85],{"id":972},"setting-up-a-test-plc",[10,974,975],{},"This section is for readers who do not have a real TwinCAT PLC available and want to set up a minimal test environment to follow along with this guide. If you already have a PLC running, you do not need this section.",[977,978,980],"h3",{"id":979},"what-you-need","What You Need",[34,982,983,986],{},[37,984,985],{},"A Windows machine or laptop",[37,987,988,989],{},"TwinCAT XAE Shell installed. Download it from the ",[20,990,993],{"href":991,"rel":992},"https:\u002F\u002Fwww.beckhoff.com",[47],"Beckhoff website",[77,995,996],{},[10,997,998,1000],{},[138,999,184],{}," If your Windows machine has Hyper-V enabled, TwinCAT will not run in KM mode and the system tray icon will stay blue instead of turning green. Make sure Hyper-V is disabled before proceeding. You may need to restart the machine after disabling it.",[977,1002,1004],{"id":1003},"create-the-project","Create the Project",[222,1006,1007,1010,1015,1025],{},[37,1008,1009],{},"Open TwinCAT XAE Shell",[37,1011,388,1012],{},[138,1013,1014],{},"File > New > Project",[37,1016,1017,1018,1021,1022],{},"Select ",[138,1019,1020],{},"TwinCAT Projects"," then ",[138,1023,1024],{},"TwinCAT XAE Project",[37,1026,1027,1028,1031,1032],{},"Give the project a name, for example ",[98,1029,1030],{},"AdsDemo",", and click ",[138,1033,1034],{},"OK",[977,1036,1038],{"id":1037},"add-a-plc-project","Add a PLC Project",[222,1040,1041,1047],{"start":271},[37,1042,1043,1044],{},"In Solution Explorer right click the project name and select ",[138,1045,1046],{},"Add New Item",[37,1048,1017,1049,1052,1053],{},[138,1050,1051],{},"Standard PLC Project",", give it a name, and click ",[138,1054,595],{},[977,1056,1058],{"id":1057},"write-the-plc-program","Write the PLC Program",[222,1060,1061,1071],{"start":283},[37,1062,1063,1064,1067,1068],{},"In Solution Explorer expand ",[138,1065,1066],{},"PLC > your project > POUs"," and double click ",[138,1069,1070],{},"MAIN",[37,1072,1073],{},"In the declaration section (top panel) replace the existing content with:",[235,1075,1080],{"className":1076,"code":1078,"language":1079},[1077],"language-text","PROGRAM MAIN\nVAR\n    temperature : REAL := 23.5;\n    motorRunning : BOOL := FALSE;\n    setpoint : INT := 100;\n    cycleCount : INT := 0;\nEND_VAR\n","text",[98,1081,1078],{"__ignoreMap":240},[222,1083,1084],{"start":295},[37,1085,1086],{},"In the program body (bottom panel) add:",[235,1088,1091],{"className":1089,"code":1090,"language":1079},[1077],"temperature := temperature + 0.1;\nIF temperature > 100.0 THEN\n    temperature := 0.0;\nEND_IF\n\ncycleCount := cycleCount + 1;\nIF cycleCount >= 1000 THEN\n    motorRunning := NOT motorRunning;\n    cycleCount := 0;\nEND_IF\n",[98,1092,1090],{"__ignoreMap":240},[10,1094,1095,1096,1099,1100,1103,1104,1106],{},"This gives you three live variables to work with. ",[98,1097,1098],{},"temperature"," increments continuously every PLC cycle, ",[98,1101,1102],{},"motorRunning"," toggles roughly once per second, and ",[98,1105,857],{}," stays static until you write to it from FlowFuse.",[977,1108,1110],{"id":1109},"enable-symbol-creation","Enable Symbol Creation",[10,1112,1113],{},"Symbol creation must be enabled for ADS to access variables by name. Without this step the ADS client will connect successfully but fail to find any variables.",[222,1115,1116,1126,1133],{"start":301},[37,1117,1118,1119,1122,1123],{},"In Solution Explorer expand the project, then under ",[138,1120,1121],{},"Task"," double click ",[138,1124,1125],{},"PlcTask",[37,1127,1128,1129,1132],{},"Check ",[138,1130,1131],{},"Create symbols"," in the properties window that opens",[37,1134,388,1135],{},[138,1136,1034],{},[10,1138,1139],{},[403,1140],{"alt":1141,"src":1142},"PlcTask properties window showing the Create symbols checkbox enabled","\u002Fblog\u002F2026\u002F03\u002Fimages\u002Fcreate-symbol.png",[977,1144,1146],{"id":1145},"build-and-activate","Build and Activate",[222,1148,1149,1156],{"start":319},[37,1150,1151,1152,1155],{},"Press ",[138,1153,1154],{},"Ctrl+Shift+B"," to build the project. Check the output window for any errors before continuing.",[37,1157,1158,1159],{},"Right click the PLC instance in Solution Explorer and select ",[138,1160,1161],{},"Login",[77,1163,1164],{},[10,1165,1166,1168,1169,24],{},[138,1167,583],{}," If Login is not visible in the right click menu, find it in the top menu bar under ",[138,1170,1171],{},"PLC > Login",[222,1173,1174,1181],{"start":331},[37,1175,1176,1177,1180],{},"When TwinCAT prompts you to create the application on port 851, click ",[138,1178,1179],{},"Yes",". Do not skip this step or change the port.",[37,1182,1151,1183,1186],{},[138,1184,1185],{},"F5"," to start the PLC",[10,1188,1189],{},"The TwinCAT system tray icon must be green before you proceed. A blue icon means the runtime is not running and ADS connections will fail.",[10,1191,1192,1193,1196,1197,1199,1200,1202,1203,24],{},"Your test PLC is now running. Go back to the ",[20,1194,126],{"href":1195},"#configuring-ads-routes"," section and continue from there. The variable paths you will use throughout this guide are ",[98,1198,669],{},", ",[98,1201,735],{},", and ",[98,1204,813],{},[26,1206,1208],{"id":1207},"conclusion","Conclusion",[10,1210,1211],{},"You now have a working ADS connection between FlowFuse and TwinCAT, reading variables on demand, subscribing to live changes, and writing values back to the PLC. But this is just the starting point.",[10,1213,1214,1215,1217],{},"This guide covered the core nodes to get you connected and working. The ",[98,1216,385],{}," package includes several other nodes worth exploring on your own, and future articles will cover more advanced use cases in depth.",[10,1219,1220],{},"With FlowFuse you can take this further. Build real-time dashboards that visualize live PLC data, connect TwinCAT to other systems like databases, ERP, or cloud platforms, set up alerts when variables go out of range, and create operator interfaces that let your team interact with the machine from anywhere. All of it built on the same connection you just configured, without writing a single line of custom integration code.",[10,1222,1223,1224,24],{},"Beckhoff TwinCAT ADS is one of many PLCs FlowFuse connects to the modern industrial stack. For Siemens, Allen-Bradley, Omron, Modbus, OPC UA, and more, see the ",[20,1225,1227],{"href":1226},"\u002Flanding\u002Fplc\u002F","FlowFuse PLC integration overview",[1229,1230,1231],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":240,"searchDepth":253,"depth":253,"links":1233},[1234,1235,1236,1237,1238,1239,1240,1241,1242,1243,1251],{"id":28,"depth":253,"text":29},{"id":89,"depth":253,"text":90},{"id":125,"depth":253,"text":126},{"id":360,"depth":253,"text":361},{"id":409,"depth":253,"text":410},{"id":622,"depth":253,"text":623},{"id":710,"depth":253,"text":711},{"id":789,"depth":253,"text":790},{"id":885,"depth":253,"text":886},{"id":972,"depth":253,"text":85,"children":1244},[1245,1246,1247,1248,1249,1250],{"id":979,"depth":259,"text":980},{"id":1003,"depth":259,"text":1004},{"id":1037,"depth":259,"text":1038},{"id":1057,"depth":259,"text":1058},{"id":1109,"depth":259,"text":1110},{"id":1145,"depth":259,"text":1146},{"id":1207,"depth":253,"text":1208},"md",{"navTitle":5,"excerpt":1254},{"type":7,"value":1255},[1256],[10,1257,12],{},true,"\u002Fblog\u002F2026\u002F03\u002Fhow-to-connect-to-twincat-using-ads",{"title":5,"description":12},"blog\u002F2026\u002F03\u002Fhow-to-connect-to-twincat-using-ads","nwoVVJp9b4wBxaWNcX3mf7zTWkh1lIy2ObxYftG807k",1780070554412]