User Tools

Site Tools


en-us_guide:getting_started

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en-us_guide:getting_started [2026/09/14 18:12] – external edit 127.0.0.1en-us_guide:getting_started [2026/09/15 15:28] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Getting Started with Arduino IDE ====== ====== Getting Started with Arduino IDE ======
  
-Follow these steps to upload program to an MPINO or MPAINO product and check one digital output and input. Input ''0'' and output ''64'' in the examples are for MPAINO-8A8R(T). For another product, replace them with the addresses in its pin map.+This guide explains how to install Arduino IDE and the ILOGICS boards, upload the first program to an MPINO or MPAINO productand check its digital I/O.
  
-===== 1. Check the Product and I/O Addresses =====+===== 1. Install Arduino IDE and the ILOGICS Boards =====
  
-Read the full model nameR/T output type, and power-input specification on the product label. The output type determines how you connect a load and check its operation.+{{ :guide:arduino-ide-setup-flow-en.svg?1000 |Install Arduino IDE and the ILOGICS SDKthen select the board and port }}
  
-  * **MPAINO-8A8R(T):** The examples use input ''0'' and output ''64''. Check the terminals and addresses in the [[en-us_products:mpaino_8a8r|8A8R]] or [[en-us_products:mpaino_8a8t|8A8T]] pin map. +{{ :guide:arduino-ide-setup-flow-en-mobile.svg?350 |Install Arduino IDE and the ILOGICS SDK, then select the board and port }}
-  * **Other MPAINO and MPINO models:** Open your model under [[en-us_products:mpaino|MPAINO Series]] or [[en-us_products:mpino_series|MPINO Series]] and check the input and output addresses you will use.+
  
-===== 2Before Powering On =====+  - Install the Windows Arduino IDE from the [[https://www.arduino.cc/en/software|official Arduino download page]]. 
 +  - Download and run ''ARDUINO SDK INSTALL'' from the [[https://www.ilogics.net/en-us/resources/downloads/software/3|ILOGICS Arduino SDK download page]]. 
 +  - Close Arduino IDE and start it again.
  
-  - Check the terminal names and power polarity against the product manual. +At the top left of Arduino IDE, **Verify (✓)** compiles the code and **Upload ()** transfers it to the product on the selected port.
-  - Check COM wiring and the upload cable specified for the product. For the MPAINO-8A8R(Tin this example, connect a standard USB cable to the CPU module's download port+
-  - Leave output loads disconnected for the first upload and output check. +
-  - Provide emergency-stop and overcurrent-protection circuits independently of the program.+
  
-===== 3. Install Arduino IDE and the ILOGICS Boards =====+The ILOGICS SDK configures digital I/O directions automatically. These examples do not need a separate ''pinMode()'' call.
  
-{{ :guide:arduino-ide-setup-flow-en.svg?1000 |Install Arduino IDE and the ILOGICS SDK, restart, then select the board and port }}+===== 2Connect the Product and Find the COM Port =====
  
-{{ :guide:arduino-ide-setup-flow-en-mobile.svg?350 |Install Arduino IDE and the ILOGICS SDK, restart, then select the board and port }}+Disconnect output loads before the first uploadCheck the product page for the power specification and R (relay) or T (transistor) output type.
  
-  - Download and install the Windows Arduino IDE installer from the [[https://www.arduino.cc/en/software|official Arduino download page]]. +==== All MPAINO Models ====
-  - Download and run ''ARDUINO SDK INSTALL'' from the [[https://www.ilogics.net/en-us/resources/downloads/software/3|ILOGICS Arduino SDK download page]]. It adds the ILOGICS board definitions to Arduino IDE. +
-  - Close Arduino IDE and start it again. +
-  - Connect the product to the PC, then select its board and port as shown below.+
  
-==== Select the Board ====+  - Connect the PC to the CPU module's **USB download port** with a USB cable. 
 +  - In Windows **Device Manager → Ports (COM & LPT)**, note the COM number shown for ''Silicon Labs CP210x USB to UART Bridge(COMx)''
 +  - If the port does not appear, install the [[https://www.ilogics.net/en-us/resources/downloads/driver/2|CP210x USB driver]] and reconnect the cable.
  
-Click the board selector at the top of Arduino IDE and choose **Select other board and port…**. This actual Arduino IDE screen shows MPAINO-8A8R(T) in the search results.+==== MPINO-16A8R ====
  
-{{ :guide:arduino-ide-board-selection.svg?480 |Search for and select the MPAINO-8A8R(Tboard in Arduino IDE }}+  Connect the PC to the product's **USB download port** with a **USB A-to-B cable**. 
 +  In Device Manager, note the COM number shown for ''Silicon Labs CP210x USB to UART Bridge(COMx)''
 +  - If the port does not appear, install the [[https://www.ilogics.net/en-us/resources/downloads/driver/2|CP210x USB driver]] and reconnect the cable.
  
-{{ :guide:arduino-ide-board-selection-mobile.svg?350 |Search for and select the MPAINO-8A8R(T) board in Arduino IDE }}+==== Other MPINO Models ====
  
-^ Marker ^ What to do ^ +  - Connect the PC to the product's download port with an **MP Download Cable**. 
-| **1** | Enter the product model in the **BOARDS** search field| +  In Device Managernote the COM number shown for ''USB Serial Port(COMx)''. 
-| **2** | Select the ILOGICS board that matches the product label. For MPINO-8A4R-S and MPINO-8A4T-Sselect ''MPINO-8A4R(T)-S''. |+  - If the port does not appear, install the [[https://www.ilogics.net/en-us/resources/downloads/driver/1|FTDI driver for the MP Download Cable]] and reconnect it.
  
-==== Select the Port ====+===== 3. Select the Board and Port =====
  
-After connecting the MPAINO-8A8R(T), **Windows Device Manager → Ports (COM & LPT)** showed ''Silicon Labs CP210x USB to UART Bridge(COM1)''Arduino IDE showed the same port as ''COM1 Serial Port (USB)''Match the **COM number** when selecting the port.+Find the board name in the [[:en-us_products:mpino_series#mpino_series_specifications|MPINO Series specifications]] or the [[:en-us_products:mpaino#mpaino_series_specifications|MPAINO Series specifications]]. Open **Select other board and port…** from the board selector at the top of Arduino IDE, then search for the same nameThe product name in the figure is an example of the selection method.
  
-{{ :guide:arduino-ide-port-selection.svg?480 |Select the MPAINO COM1 port in Arduino IDE }}+{{ :guide:arduino-ide-board-selection.svg?480 |Example of searching for and selecting an ILOGICS board in Arduino IDE }}
  
-{{ :guide:arduino-ide-port-selection-mobile.svg?350 |Select the MPAINO COM1 port in Arduino IDE }}+{{ :guide:arduino-ide-board-selection-mobile.svg?350 |Board-selection example for a narrow screen }}
  
-Marker What to do +No. Selection 
-| **1** | Under **PORTS**, select the COM number found in Device Manager. ''COM1'' is the number on this PC; yours may differ. | +| **1** | In the **BOARDS** search fieldenter the board name shown in the product-family table. | 
-| **2** | Click **OK** to apply the board and port selection. |+| **2** | Select the result with the exact same name. R and T products grouped together use the common board name containing ''R(T)''. |
  
-Arduino IDE may show ''COMx Serial Port (USB)'' rather than the driver name. Products that use an **MP download cable** appear in Windows Device Manager as ''USB Serial Port(COMx)''. Distinguish that port from the CP210x port used by this MPAINO example.+In **PORTS**, select the COM number found in Device Manager.
  
-If no COM port appears in Device Manager, install the driver for your connection and reconnect the cable. +{{ :guide:arduino-ide-port-selection.svg?480 |Example of selecting and applying a CP210x COM port in Arduino IDE }}
-  * **Products with built-in CP210x, including MPAINO-8A8R(T):** [[https://www.ilogics.net/en-us/resources/downloads/driver/2|CP210x USB driver]] +
-  * **Products using an MP download cable:** [[https://www.ilogics.net/en-us/resources/downloads/driver/1|FTDI USB driver]]+
  
-If the board is already selected, you can choose the same port from the menu**① Tools → ② Port → ③ COM1**.+{{ :guide:arduino-ide-port-selection-mobile.svg?350 |CP210x COM-port example for a narrow screen }}
  
-{{ :guide:arduino-ide-tools-port.svg?450 |Select Port and COM1 from the Arduino IDE Tools menu }}+{{ :guide:arduino-ide-mpino-port-selection.svg?480 |Example of selecting the MP Download Cable COM port in Arduino IDE }}
  
-{{ :guide:arduino-ide-tools-port-mobile.svg?350 |Select Port and COM1 from the Arduino IDE Tools menu }}+{{ :guide:arduino-ide-mpino-port-selection-mobile.svg?350 |MP Download Cable COM-port example for a narrow screen }}
  
-Selecting only a board is enough to verify codebut uploading also requires a port.+^ No. ^ Selection ^ 
 +| **1** | Under **PORTS**choose the same COM number shown in Device Manager. ''COM1'' and ''COM3'' in the figures are examples. | 
 +| **2** | Select **OK** to apply the board and port. |
  
-===== 4Your First Output Program =====+You can also select the same items from **Tools → Board** and then **Tools → Port**.
  
-The sketch below turns MPAINO-8A8R(T) output ''64'' on and off every 0.5 seconds.+===== 4Blink the First Output =====
  
-{{ :guide:arduino-ide-editor-marked.svg?1000 |Arduino IDE sketch editor, Verify, Upload, and board selector }}+Find the first I/O numbers for your model in the product-family table, then use the example below with the same numbersOpen **File → New Sketch**enter the code, and save it with **Ctrl + S**. Select **Verify (✓)** and wait for ''Done compiling.''then select **Upload (→)**.
  
-{{ :guide:arduino-ide-editor-mobile.svg?350 |Arduino IDE sketch editor, Verify, Upload, and board selector }}+A relay output can be checked by its operating soundTo check a transistor outputswitch off power and connect a test load according to the output-wiring section on the product page.
  
-^ Marker ^ What to do ^ +==== All MPAINO Models · Output 64 ====
-| **1** | **Verify (✓):** Compile the code and check for errors. This does not send the program to the product. | +
-| **2** | **Upload (→):** Send the verified program to the product on the selected port. | +
-| **3** | **Board selector:** Check the selected model, or reopen board and port selection. | +
-| **4** | **Sketch editor:** Enter the code below. |+
  
 <code cpp> <code cpp>
-const uint8_t OUTPUT_CHANNEL = 64; // MPAINO-8A8R(T) example+// first MPAINO output 
 +const uint8_t OUTPUT_CHANNEL = 64;
  
 void setup() {} void setup() {}
Line 93: Line 89:
 </code> </code>
  
-For MPAINO-8A8R(T), the ILOGICS SDK's ''main()'' configures the output pin before ''setup()'' runs. This example does not need a separate ''pinMode()'' call.+==== MPINO Models with Input 0 and Output 32 ====
  
-  - Open **File → New Sketch** and enter the code. For MPINO or another MPAINO model, change ''OUTPUT_CHANNEL'' to the first output address in that model's pin map. +Use this example with MPINO-8A4R(T)-SMPINO-8A4R-SU, MPINO-8A8R(T)-S, and MPINO-16A16R.
-  Save the sketch with **Ctrl + S**. +
-  - Click **Verify ()**. Compilation is complete when the output panel shows no errors and ''Done compiling.'' appears. +
-  Check the board and portclick **Upload ()**, and wait for the completion message. +
-  With the output load still disconnected, check that the indicator for that output changes state every 0.5 seconds, if fitted.+
  
-You may also hear a relay contact switch. Without an external supply and load, a transistor output cannot be measured like a voltage output. If the product has no output indicatorfirst check the output test method in its manual.+<code cpp> 
 +// first output on these MPINO models 
 +const uint8_t OUTPUT_CHANNEL = 32; 
 + 
 +void setup() {} 
 + 
 +void loop() { 
 +  digitalWrite(OUTPUT_CHANNELHIGH); 
 +  delay(500); 
 +  digitalWrite(OUTPUT_CHANNEL, LOW); 
 +  delay(500); 
 +
 +</code>
  
-===== 5. Turn an Output On with an Input =====+==== MPINO-8A8R and MPINO-16A8R8T · Relay Output 62 ====
  
-This example reads MPAINO-8A8R(Tinput ''0'' and applies the same state to output ''64''. The output turns on when the input is ''HIGH'' and turns off when it is ''LOW''.+To test transistor output O(39on MPINO-16A8R8T, check the transistor-output wiring on its product page and change ''OUTPUT_CHANNEL'' to ''39''.
  
 <code cpp> <code cpp>
-const uint8_t INPUT_CHANNEL = 0;   // MPAINO-8A8R(Tinput example +// relay output R(62
-const uint8_t OUTPUT_CHANNEL = 64// MPAINO-8A8R(T) output example+const uint8_t OUTPUT_CHANNEL = 62;
  
 void setup() {} void setup() {}
  
 void loop() { void loop() {
-  bool inputState = digitalRead(INPUT_CHANNEL); +  digitalWrite(OUTPUT_CHANNEL, HIGH); 
-  digitalWrite(OUTPUT_CHANNEL, inputState);+  delay(500); 
 +  digitalWrite(OUTPUT_CHANNEL, LOW); 
 +  delay(500);
 } }
 </code> </code>
  
-**Verify ()** and **Upload ()** the sketchConnect the input signal as shown in the MPAINO-8A8R(T) manualChange its state and check that the output state changes with it. MPAINO digital inputs have built-in pull-down resistors. For another modeluse addresses from that product's pin map and check its input circuit.+==== MPINO-16A8R · Output 39 ==== 
 + 
 +<code cpp> 
 +// relay output R(39) 
 +const uint8_t OUTPUT_CHANNEL = 39; 
 + 
 +void setup() {} 
 + 
 +void loop() { 
 +  digitalWrite(OUTPUT_CHANNEL, HIGH); 
 +  delay(500); 
 +  digitalWrite(OUTPUT_CHANNEL, LOW); 
 +  delay(500); 
 +
 +</code> 
 + 
 +===== 5Control the Output with the First Input ===== 
 + 
 +Switch off power before wiring the input and COMTurn the input on and off and check that the output follows it. Use the **Digital Inputs** and **Output** sections of your product page to identify the terminals and COM. 
 + 
 +==== All MPAINO Models · Input 0 → Output 64 ==== 
 + 
 +<code cpp> 
 +// first MPAINO input 
 +const uint8_t INPUT_CHANNEL = 0; 
 +const uint8_t OUTPUT_CHANNEL = 64; 
 + 
 +void setup() {} 
 + 
 +void loop() { 
 +  const bool inputOn = digitalRead(INPUT_CHANNEL); 
 +  digitalWrite(OUTPUT_CHANNEL, inputOn); 
 +
 +</code> 
 + 
 +==== MPINO Models with Input 0 and Output 32 ==== 
 + 
 +<code cpp> 
 +// first input on these MPINO models 
 +const uint8_t INPUT_CHANNEL = 0; 
 +const uint8_t OUTPUT_CHANNEL = 32; 
 + 
 +void setup() {} 
 + 
 +void loop() { 
 +  const bool inputOn = digitalRead(INPUT_CHANNEL); 
 +  digitalWrite(OUTPUT_CHANNEL, inputOn); 
 +
 +</code> 
 + 
 +==== MPINO-8A8R and MPINO-16A8R8T · Input 22 → Relay Output 62 ==== 
 + 
 +<code cpp> 
 +// input I(22) 
 +const uint8_t INPUT_CHANNEL = 22; 
 +const uint8_t OUTPUT_CHANNEL = 62; 
 + 
 +void setup() {} 
 + 
 +void loop() { 
 +  const bool inputOn = digitalRead(INPUT_CHANNEL); 
 +  digitalWrite(OUTPUT_CHANNELinputOn); 
 +
 +</code> 
 + 
 +==== MPINO-16A8R · Input 22 → Output 39 ==== 
 + 
 +<code cpp> 
 +// input I(22) 
 +const uint8_t INPUT_CHANNEL = 22; 
 +const uint8_t OUTPUT_CHANNEL = 39; 
 + 
 +void setup() {} 
 + 
 +void loop() { 
 +  const bool inputOn = digitalRead(INPUT_CHANNEL); 
 +  digitalWrite(OUTPUT_CHANNEL, inputOn); 
 +
 +</code>
  
-===== 6. If Something Does Not Work =====+===== 6. If Something Goes Wrong =====
  
 ^ Symptom ^ What to check ^ ^ Symptom ^ What to check ^
-| The product is missing from board search Check that ''ARDUINO SDK INSTALL'' ran, then restart Arduino IDE. | +| The model is missing from the board results Confirm that ''ARDUINO SDK INSTALL'' ran, then restart Arduino IDE. Search for the board name exactly as shown in the product-family table. | 
-Verification reports an error | Read the error location in the output panel. Check the code for typos and confirm the selected board. | +No COM port appears in Device Manager | Use section 3 to check the connection and driver for your product. MPINO-16A8R does not use the MP Download Cable. | 
-| Upload fails | Check the board and COM port, the product's upload cableand product power. | +| Verify reports an error | Check that the selected board matches the product and the code was entered correctly. Start with the first error shown in the output panel. | 
-| Upload completes but the output does not change | Check that ''OUTPUT_CHANNEL'' is an output address in the product pin map. Check the output type and whether an indicator is fitted. |+| Upload fails | Confirm that Device Manager and Arduino IDE show the same COM number. Check the cable connection and product power. | 
 +| Upload succeeds but the output does not change | Recheck the first output number in the product-family table and the R/T output type on the product page. A transistor output needs a wired test load to show its state. | 
 +| The output does not follow the input | Recheck the first input number in the product-family table and the input-to-COM wiring on the product page. |
  
 ===== Next Documents ===== ===== Next Documents =====
  
-  * [[en-us_guide:wiring|I/Wiring Principles]] +  * [[en-us_guide:wiring|First wiring and I/O check]] 
-  * [[en-us_commands:builtin|Built-in Function Index]] — Use ''Ibounce()'' to filter input chatter and ''Iton()'' for a delayed action. +  * [[en-us_commands:builtin|ILOGICS Built-in Commands]] 
-  * [[:en-us_safety|Industrial Equipment Safety Precautions]]+  * [[:en-us_safety|Safety and Installation Notes]]
  
en-us_guide/getting_started.1789377163.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki