{"id":57442,"date":"2022-05-03T10:29:18","date_gmt":"2022-05-03T02:29:18","guid":{"rendered":"https:\/\/www.tm-robot.com\/?post_type=docs&p=57442"},"modified":"2023-11-01T11:49:09","modified_gmt":"2023-11-01T03:49:09","slug":"tm-aoi-edgean-example-to-expand-digital-io-without-pcie-on-computer","status":"publish","type":"docs","link":"https:\/\/www.tm-robot.com.cn\/zh-hans\/docs\/tm-aoi-edgean-example-to-expand-digital-io-without-pcie-on-computer\/","title":{"rendered":"How to expand Digital IO without PCIE on computer [TM AOI Edge]"},"content":{"rendered":"
There are two ways to use external I\/O device with TM AOI Edge software. One is installing PCIE I\/O Module on the computer. But if it\u2019s unable to install this module on your computer, you can access I\/O device through a COM Port.<\/p>\n
Here we will use an Advantech RS485 I\/O Module: ADAM-4055 to achieve I\/O control.<\/p>\n
We will use an external camera to detect objects, and how to trigger the camera to photo depends on the state of the toggle switch. The pins of the switch is connected to a DI port of ADAM-4055, and signals are read in AOI Edge by using a USB-RS485 cable.<\/p>\n When the switch turns on which also means the connected DI port triggers, running Vision Job for object detection.<\/p>\n Do as following steps: 2. Add a Set Node (SET1). Use com_write()<\/strong> command to write data to ADAM-4055.<\/p>\n “$006” stands for reading DI signal. Ctrl(“\\r”) stands for newline.<\/p><\/blockquote>\n 3. Create a new byte array<\/strong> and set size as 8. Then add a Set Node (SET2). Use com_read()<\/strong> command to read data from ADAM-4055.<\/p>\n “!” is starting symbol of Advantech product.<\/p><\/blockquote>\n The project of the example in AOI Edge is as below.<\/p>\n 1. Make ADAM-4055 settings. In ASCII encoding rule, number 49 in decimal system stands for Arabic number 1 while number 48 stands for 0. Besides, which DI is triggered is identified by the 3rd<\/sup> and 4th<\/sup> elements and the 1st<\/sup> and 2nd<\/sup> elements represent the address of ADAM-4055. More details in\u00a0ADAM-4000 Series Manual<\/a> .<\/p><\/blockquote>\n When the switch turns on (Yes path<\/strong>), continue running the following steps. Otherwise (No path<\/strong>), show warning in the Display Board and re-identify the state of the switch.<\/p>\n 3. Add a Vision Job<\/strong> and make settings as below.<\/p>\n<\/a><\/p>\n
Introduction of Example<\/h1>\n
<\/a><\/p>\n
Hardware Connection and Setting<\/h1>\n
\n
\n
\n
\n
\n
\n
\n
<\/a><\/p>\n
<\/a><\/p>\n
\n
\n1. Add a new Serial Port<\/strong> and adjust the settings below.<\/p>\n<\/a><\/p>\n
<\/a><\/p>\n
<\/a><\/p>\n
TMflow Project Example<\/h1>\n
<\/a><\/p>\n
\n
\n2. Use an IF<\/strong> Node to identify the state of the switch.<\/p>\n<\/a><\/p>\n
<\/a><\/p>\n