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 13:44] – 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+
-  - 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 =====
  
-  - Download and install the Windows Arduino IDE installer from the [[https://www.arduino.cc/en/software|official Arduino download page]]. +Disconnect output loads before the first uploadCheck the product page for the power specification and R (relay) or T (transistor) output type.
-  - 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 and Port ====+==== All MPAINO Models ====
  
-Click the board selector at the top of Arduino IDE and choose **Select other board and port**. The image shows search for MPAINO-8A8R(T).+  - Connect the PC to the CPU module'**USB download port** with 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.
  
-{{ :guide:arduino-ide-board-port-marked.svg?950 |Arduino IDE board and port selection dialog }}+==== MPINO-16A8R ====
  
-^ Marker ^ What to do ^ +  - Connect the PC to the product'**USB download port** with a **USB A-to-B cable**. 
-| **1** | Enter the product model in the **BOARDS** search field. | +  In Device Managernote the COM number shown for ''Silicon Labs CP210x USB to UART Bridge(COMx)''
-**2** | Select the ILOGICS board that matches the product labelFor 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/2|CP210x USB driver]] and reconnect the cable.
-| **3** | Under **PORTS**, select the COM port that appears when you connect the product''COM3'' in the image is only an example; your port number may differ. | +
-| **4** | Click **OK** to apply the selection|+
  
-You can verify code after selecting only a board, but uploading also requires a port. If you cannot identify the port, check its COM number under **Windows Device Manager → Ports (COM & LPT)**.+==== Other MPINO Models ====
  
-The example addresses in this guide use an ILOGICS board definitionSome models can also use Arduino Mega/Mega 2560but in that case you must use the Arduino pin numbers in the product manualSelect an ILOGICS board definition to use ILOGICS built-in functions.+  - Connect the PC to the product's download port with an **MP Download Cable**. 
 +  - In Device Managernote the COM number shown for ''USB Serial Port(COMx)''
 +  - 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.
  
-===== 4Your First Output Program =====+===== 3Select the Board and Port =====
  
-The sketch below turns MPAINO-8A8R(T) output ''64'' on and off every 0.5 seconds.+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-editor-marked.svg?1000 |Arduino IDE sketch editor, Verify, Upload, and board selector }}+{{ :guide:arduino-ide-board-selection.svg?480 |Example of searching for and selecting an ILOGICS board in Arduino IDE }}
  
-Marker What to do +{{ :guide:arduino-ide-board-selection-mobile.svg?350 |Board-selection example for a narrow screen }} 
-| **1** | **Verify ():** Compile the code and check for errorsThis does not send the program to the product. | + 
-| **2** | **Upload (→):** Send the verified program to the product on the selected port. | +No. Selection 
-| **3** | **Board selector:** Check the selected model, or reopen board and port selection. | +| **1** | In the **BOARDS** search field, enter the board name shown in the product-family table. | 
-**4** **Sketch editor:** Enter the code below|+| **2** | Select the result with the exact same name. R and T products grouped together use the common board name containing ''R(T)''. | 
 + 
 +In **PORTS**, select the COM number found in Device Manager. 
 + 
 +{{ :guide:arduino-ide-port-selection.svg?480 |Example of selecting and applying a CP210x COM port in Arduino IDE }} 
 + 
 +{{ :guide:arduino-ide-port-selection-mobile.svg?350 |CP210x COM-port example for a narrow screen }} 
 + 
 +{{ :guide:arduino-ide-mpino-port-selection.svg?480 |Example of selecting the MP Download Cable COM port in Arduino IDE }} 
 + 
 +{{ :guide:arduino-ide-mpino-port-selection-mobile.svg?350 |MP Download Cable COM-port example for a narrow screen }} 
 + 
 +^ 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. | 
 + 
 +You can also select the same items from **Tools → Board** and then **Tools → Port**. 
 + 
 +===== 4. Blink the First Output ===== 
 + 
 +Find the first I/O numbers for your model in the product-family table, then use the example below with the same numbers. Open **File → New Sketch**, enter the code, and save it with **Ctrl + S**Select **Verify (✓)** and wait for ''Done compiling.'', then select **Upload (→)**. 
 + 
 +A relay output can be checked by its operating sound. To check a transistor output, switch off power and connect a test load according to the output-wiring section on the product page. 
 + 
 +==== All MPAINO Models · Output 64 ====
  
 <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() {} 
-  pinMode(OUTPUT_CHANNEL, OUTPUT);+ 
 +void loop() { 
 +  digitalWrite(OUTPUT_CHANNEL, HIGH); 
 +  delay(500); 
 +  digitalWrite(OUTPUT_CHANNEL, LOW); 
 +  delay(500);
 } }
 +</code>
 +
 +==== MPINO Models with Input 0 and Output 32 ====
 +
 +Use this example with MPINO-8A4R(T)-S, MPINO-8A4R-SU, MPINO-8A8R(T)-S, and MPINO-16A16R.
 +
 +<code cpp>
 +// first output on these MPINO models
 +const uint8_t OUTPUT_CHANNEL = 32;
 +
 +void setup() {}
  
 void loop() { void loop() {
Line 69: Line 107:
 </code> </code>
  
-  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. +==== MPINO-8A8R and MPINO-16A8R8T · Relay Output 62 ====
-  - 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 port, click **Upload (→)**, and wait for the completion message. +
-  With the output load still disconnected, check that the corresponding output indicator changes every 0.5 seconds.+
  
-You may also hear a relay contact switch. Without an external supply and loadtransistor output cannot be measured like a voltage output. Check its indicator and follow the measurement method in the product manual.+To test transistor output O(39) on MPINO-16A8R8Tcheck the transistor-output wiring on its product page and change ''OUTPUT_CHANNEL'' to ''39''.
  
-===== 5. Turn an Output On with an Input =====+<code cpp> 
 +// relay output R(62) 
 +const uint8_t OUTPUT_CHANNEL 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''.+void setup() {} 
 + 
 +void loop() { 
 +  digitalWrite(OUTPUT_CHANNEL, HIGH); 
 +  delay(500); 
 +  digitalWrite(OUTPUT_CHANNEL, LOW); 
 +  delay(500); 
 +
 +</code> 
 + 
 +==== MPINO-16A8R · Output 39 ====
  
 <code cpp> <code cpp>
-const uint8_t INPUT_CHANNEL = 0;   // MPAINO-8A8R(Tinput example +// relay output R(39
-const uint8_t OUTPUT_CHANNEL = 64// MPAINO-8A8R(T) output example+const uint8_t OUTPUT_CHANNEL = 39;
  
-void setup() { +void setup() {} 
-  pinMode(INPUT_CHANNELINPUT); + 
-  pinMode(OUTPUT_CHANNEL, OUTPUT);+void loop() { 
 +  digitalWrite(OUTPUT_CHANNELHIGH); 
 +  delay(500); 
 +  digitalWrite(OUTPUT_CHANNEL, LOW); 
 +  delay(500);
 } }
 +</code>
 +
 +===== 5. Control the Output with the First Input =====
 +
 +Switch off power before wiring the input and COM. Turn 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() { void loop() {
-  bool inputState = digitalRead(INPUT_CHANNEL); +  const bool inputOn = digitalRead(INPUT_CHANNEL); 
-  digitalWrite(OUTPUT_CHANNEL, inputState);+  digitalWrite(OUTPUT_CHANNEL, inputOn);
 } }
 </code> </code>
  
-**Verify ()** and **Upload ()** the sketch. Connect the input signal according to the product manual. Change its state and check that the output indicator changes with it. MPAINO digital inputs have built-in pull-down resistorsso use ''INPUT''. For MPINO, check the model'input circuit and pin map before choosing the addresses and input configuration.+==== 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 indicator. |+| 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.1789361076.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki