{"id":96324,"date":"2023-07-20T10:37:59","date_gmt":"2023-07-20T02:37:59","guid":{"rendered":"https:\/\/www.tm-robot.com\/?post_type=docs&#038;p=96324"},"modified":"2023-09-20T13:57:29","modified_gmt":"2023-09-20T05:57:29","slug":"how-to-develop-a-tmcraft-node","status":"publish","type":"docs","link":"https:\/\/www2.tm-robot.com\/ja\/docs\/how-to-develop-a-tmcraft-node\/","title":{"rendered":"How to Develop a TMcraft Node"},"content":{"rendered":"<p>Examples are valid for:<\/p>\n<p>TMflow Software version: 2.14 or above.<\/p>\n<p>TM Robot Hardware version: Only support HW3.2 or above<\/p>\n<p>Other specific requirements: None<\/p>\n<p>Note that older or newer software versions may have different results.<\/p>\n<p>&nbsp;<\/p>\n<p>TMcraft node is customized Node UI Program, a C# + WPF-based execution file (exe) developed by 3<sup>rd<\/sup> party. The Program can interacts with TMflow through TMcraft API to do actions, such as creating or modifying project variables, creating or modifying points, setting I\/O, jogging the robot, etc. Before the Node UI is closed, the program can transform the settings into TMscript and write it into the Flow Project.<\/p>\n<p>For security issues, developers cannot just put an exe file onto TMflow; instead, they have to develop and build the Node UI into a User Control Library ( DLL file ) first. Through the TMcraft-Build on TMstudio Pro, this User Control Library is then built as an execution file and zipped with other resources (such as libraries, media, etc.). Finally, import this zipped file to TMflow, this TMcraft Node can be used on Flow project after enabling.<\/p>\n<p><a href=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/07\/messageImage_1689819996096.jpg\"><img loading=\"lazy\" class=\"aligncenter wp-image-96331 size-full\" src=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/07\/messageImage_1689819996096.jpg\" alt=\"\" width=\"1076\" height=\"369\" srcset=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/07\/messageImage_1689819996096.jpg 1076w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/07\/messageImage_1689819996096-300x103.jpg 300w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/07\/messageImage_1689819996096-1024x351.jpg 1024w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/07\/messageImage_1689819996096-768x263.jpg 768w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/07\/messageImage_1689819996096-360x123.jpg 360w\" sizes=\"(max-width: 1076px) 100vw, 1076px\" \/><\/a><\/p>\n<h2><strong>What is TMcraft API<\/strong><\/h2>\n<p>TMcraft API is an interface layer that connects TMcraft Node with TMflow to get all sorts of robot\/project information and request TMflow to take different actions or generate scripts for the project run. In addition, this API is an actual Dynamic Link Library file (DLL) for users to add as one of the program dependencies and to use the functions within to interact with TMflow.<\/p>\n<p>&nbsp;<\/p>\n<p>TMcraft.dll has four parts: ITMcraftNodeEntry, Providers, Info and ENUMs.<\/p>\n<p>&nbsp;<\/p>\n<ol>\n<li><strong>ITMcraftNodeEntry<\/strong> is the essential part of the API to establish the connection between the Node and TMflow (i.e. <span style=\"color: #3366ff;\">InitializeNode()<\/span>).The rest of the API functions are not available without this connection.<\/li>\n<li><strong>Providers<\/strong> are a set of classes with functions associated with different interactions with TMflow frequently used among the Programs.<\/li>\n<li><strong>Info<\/strong> is a collection of classes, such as BaseInfo, PointInfo, and VariableInfo, used by different types of Provider functions.<\/li>\n<li><strong>ENUM<\/strong> are value types defined by a set of named constants of the underlying integral numeric type, including: IO_TYPE, VariableType, FreeBotModes, RobotEventType and TMflowType.<\/li>\n<\/ol>\n<p>Also, TMcraft API includes a few member functions: <span style=\"color: #3366ff;\">Close()<\/span>, <span style=\"color: #3366ff;\">GetErrMsg()<\/span>, and <span style=\"color: #3366ff;\">Version<\/span>. Refer to the <em>TMcraft Node API function manual<\/em> for details.<\/p>\n<p>&nbsp;<\/p>\n<p>Here is the simplest sample code of a TMcraft Node.<\/p>\n<p><a href=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/07\/messageImage_1689820016924.jpg\"><img loading=\"lazy\" class=\"aligncenter wp-image-96325 size-full\" src=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/07\/messageImage_1689820016924.jpg\" alt=\"TMcraft Node Code Example \" width=\"968\" height=\"688\" srcset=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/07\/messageImage_1689820016924.jpg 968w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/07\/messageImage_1689820016924-300x213.jpg 300w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/07\/messageImage_1689820016924-768x546.jpg 768w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/07\/messageImage_1689820016924-360x256.jpg 360w\" sizes=\"(max-width: 968px) 100vw, 968px\" \/><\/a><\/p>\n<p>Please download sample script from <em><a href=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/07\/TMCraft-sample-script.docx\"><span style=\"color: #ff0000;\">here<\/span><\/a><\/em><\/p>\n<p>&nbsp;<\/p>\n<p>This sample can be defined as the following parts:<\/p>\n<ol>\n<li>Add TMcraft.dll as a reference (<span style=\"color: #3366ff;\">using<\/span> TMcraft).<\/li>\n<li>Implement the Interface ITMcraftNodeEntry to the User Control class. This interface has two members that require implementation, <span style=\"color: #3366ff;\">InitializeNode()<\/span> and <span style=\"color: #3366ff;\">InscribeScript()<\/span>.<\/li>\n<li><span style=\"color: #3366ff;\">InitializeNode()<\/span> would be activated once opened the Node UI, which connects the Node with TMflow; technically, this makes the TMcraftNodeAPI object (TMNodeEditor) available for calling all TMcraft functions, such as <span style=\"color: #3366ff;\">DataStorageProvider.SaveData()<\/span>.<\/li>\n<li><span style=\"color: #3366ff;\">InscribeScript()<\/span> would activate when the Node UI is closed, and developers should define what TMscript would implement to the flow project using ScriptWriteProvider functions.<\/li>\n<li>The rest of the program should be all sorts of event functions that could interact with TMflow through TMcraft functions.<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>For more details on developing, please refer to tutorials and sample codes of the TMcraft Development Kit.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Examples are valid for: TMflow Software version: 2.14 or above. TM Robot Hardware version: Only support HW3.2  [&hellip;]<\/p>\n","protected":false},"author":8760,"featured_media":0,"parent":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"doc_category":[4759],"doc_tag":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v16.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Develop a TMcraft Node | Techman Robot<\/title>\n<meta name=\"robots\" content=\"noindex, follow\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Develop a TMcraft Node | Techman Robot\" \/>\n<meta property=\"og:description\" content=\"Examples are valid for: TMflow Software version: 2.14 or above. TM Robot Hardware version: Only support HW3.2 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www2.tm-robot.com\/ja\/docs\/how-to-develop-a-tmcraft-node\/\" \/>\n<meta property=\"og:site_name\" content=\"Techman Robot\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-20T05:57:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/07\/messageImage_1689819996096.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.tm-robot.com.cn\/de\/#organization\",\"name\":\"Techman Robot\",\"url\":\"https:\/\/www.tm-robot.com.cn\/de\/\",\"sameAs\":[],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.tm-robot.com.cn\/de\/#logo\",\"inLanguage\":\"ja\",\"url\":\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2018\/09\/logo.png\",\"contentUrl\":\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2018\/09\/logo.png\",\"width\":221,\"height\":196,\"caption\":\"Techman Robot\"},\"image\":{\"@id\":\"https:\/\/www.tm-robot.com.cn\/de\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.tm-robot.com.cn\/de\/#website\",\"url\":\"https:\/\/www.tm-robot.com.cn\/de\/\",\"name\":\"Techman Robot\",\"description\":\"Intelligent Cobots for a World of Applications\",\"publisher\":{\"@id\":\"https:\/\/www.tm-robot.com.cn\/de\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.tm-robot.com.cn\/de\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"ja\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www2.tm-robot.com\/ja\/docs\/how-to-develop-a-tmcraft-node\/#primaryimage\",\"inLanguage\":\"ja\",\"url\":\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/07\/messageImage_1689819996096.jpg\",\"contentUrl\":\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/07\/messageImage_1689819996096.jpg\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www2.tm-robot.com\/ja\/docs\/how-to-develop-a-tmcraft-node\/#webpage\",\"url\":\"https:\/\/www2.tm-robot.com\/ja\/docs\/how-to-develop-a-tmcraft-node\/\",\"name\":\"How to Develop a TMcraft Node | Techman Robot\",\"isPartOf\":{\"@id\":\"https:\/\/www.tm-robot.com.cn\/de\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www2.tm-robot.com\/ja\/docs\/how-to-develop-a-tmcraft-node\/#primaryimage\"},\"datePublished\":\"2023-07-20T02:37:59+00:00\",\"dateModified\":\"2023-09-20T05:57:29+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www2.tm-robot.com\/ja\/docs\/how-to-develop-a-tmcraft-node\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www2.tm-robot.com\/ja\/docs\/how-to-develop-a-tmcraft-node\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www2.tm-robot.com\/ja\/docs\/how-to-develop-a-tmcraft-node\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.tm-robot.com\/ja\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Docs\",\"item\":\"https:\/\/www2.tm-robot.com\/ja\/docs\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Develop a TMcraft Node\"}]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Develop a TMcraft Node | Techman Robot","robots":{"index":"noindex","follow":"follow"},"og_locale":"ja_JP","og_type":"article","og_title":"How to Develop a TMcraft Node | Techman Robot","og_description":"Examples are valid for: TMflow Software version: 2.14 or above. TM Robot Hardware version: Only support HW3.2 [&hellip;]","og_url":"https:\/\/www2.tm-robot.com\/ja\/docs\/how-to-develop-a-tmcraft-node\/","og_site_name":"Techman Robot","article_modified_time":"2023-09-20T05:57:29+00:00","og_image":[{"url":"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/07\/messageImage_1689819996096.jpg"}],"twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/www.tm-robot.com.cn\/de\/#organization","name":"Techman Robot","url":"https:\/\/www.tm-robot.com.cn\/de\/","sameAs":[],"logo":{"@type":"ImageObject","@id":"https:\/\/www.tm-robot.com.cn\/de\/#logo","inLanguage":"ja","url":"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2018\/09\/logo.png","contentUrl":"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2018\/09\/logo.png","width":221,"height":196,"caption":"Techman Robot"},"image":{"@id":"https:\/\/www.tm-robot.com.cn\/de\/#logo"}},{"@type":"WebSite","@id":"https:\/\/www.tm-robot.com.cn\/de\/#website","url":"https:\/\/www.tm-robot.com.cn\/de\/","name":"Techman Robot","description":"Intelligent Cobots for a World of Applications","publisher":{"@id":"https:\/\/www.tm-robot.com.cn\/de\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.tm-robot.com.cn\/de\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"ja"},{"@type":"ImageObject","@id":"https:\/\/www2.tm-robot.com\/ja\/docs\/how-to-develop-a-tmcraft-node\/#primaryimage","inLanguage":"ja","url":"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/07\/messageImage_1689819996096.jpg","contentUrl":"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/07\/messageImage_1689819996096.jpg"},{"@type":"WebPage","@id":"https:\/\/www2.tm-robot.com\/ja\/docs\/how-to-develop-a-tmcraft-node\/#webpage","url":"https:\/\/www2.tm-robot.com\/ja\/docs\/how-to-develop-a-tmcraft-node\/","name":"How to Develop a TMcraft Node | Techman Robot","isPartOf":{"@id":"https:\/\/www.tm-robot.com.cn\/de\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www2.tm-robot.com\/ja\/docs\/how-to-develop-a-tmcraft-node\/#primaryimage"},"datePublished":"2023-07-20T02:37:59+00:00","dateModified":"2023-09-20T05:57:29+00:00","breadcrumb":{"@id":"https:\/\/www2.tm-robot.com\/ja\/docs\/how-to-develop-a-tmcraft-node\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www2.tm-robot.com\/ja\/docs\/how-to-develop-a-tmcraft-node\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www2.tm-robot.com\/ja\/docs\/how-to-develop-a-tmcraft-node\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.tm-robot.com\/ja\/"},{"@type":"ListItem","position":2,"name":"Docs","item":"https:\/\/www2.tm-robot.com\/ja\/docs\/"},{"@type":"ListItem","position":3,"name":"How to Develop a TMcraft Node"}]}]}},"_links":{"self":[{"href":"https:\/\/www2.tm-robot.com\/ja\/wp-json\/wp\/v2\/docs\/96324"}],"collection":[{"href":"https:\/\/www2.tm-robot.com\/ja\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www2.tm-robot.com\/ja\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www2.tm-robot.com\/ja\/wp-json\/wp\/v2\/users\/8760"}],"replies":[{"embeddable":true,"href":"https:\/\/www2.tm-robot.com\/ja\/wp-json\/wp\/v2\/comments?post=96324"}],"version-history":[{"count":2,"href":"https:\/\/www2.tm-robot.com\/ja\/wp-json\/wp\/v2\/docs\/96324\/revisions"}],"predecessor-version":[{"id":99440,"href":"https:\/\/www2.tm-robot.com\/ja\/wp-json\/wp\/v2\/docs\/96324\/revisions\/99440"}],"wp:attachment":[{"href":"https:\/\/www2.tm-robot.com\/ja\/wp-json\/wp\/v2\/media?parent=96324"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www2.tm-robot.com\/ja\/wp-json\/wp\/v2\/doc_category?post=96324"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www2.tm-robot.com\/ja\/wp-json\/wp\/v2\/doc_tag?post=96324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}