This is an old revision of the document!
Table of Contents
Getting Started with Arduino IDE
Follow these steps to upload a 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.
1. Check the Product and I/O Addresses
Read the full model name, R/T output type, and power-input specification on the product label. The output type determines how you connect a load and check its operation.
- Other MPAINO and MPINO models: Open your model under MPAINO Series or MPINO Series and check the input and output addresses you will use.
2. Before Powering On
- Check the terminal names and power polarity against the product manual.
- 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
- Download and install the Windows Arduino IDE installer from the official Arduino download page.
- Download and run
ARDUINO SDK INSTALLfrom the 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
Click the board selector at the top of Arduino IDE and choose Select other board and port…. The image shows a search for MPAINO-8A8R(T).
| Marker | What to do |
|---|---|
| 1 | Enter the product model in the BOARDS search field. |
| 2 | Select the ILOGICS board that matches the product label. For MPINO-8A4R-S and MPINO-8A4T-S, select MPINO-8A4R(T)-S. |
| 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).
The example addresses in this guide use an ILOGICS board definition. Some models can also use Arduino Mega/Mega 2560, but in that case you must use the Arduino pin numbers in the product manual. Select an ILOGICS board definition to use ILOGICS built-in functions.
4. Your First Output Program
The sketch below turns MPAINO-8A8R(T) output 64 on and off every 0.5 seconds.
| Marker | What to do |
|---|---|
| 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. |
const uint8_t OUTPUT_CHANNEL = 64; // MPAINO-8A8R(T) example void setup() { pinMode(OUTPUT_CHANNEL, OUTPUT); } void loop() { digitalWrite(OUTPUT_CHANNEL, HIGH); delay(500); digitalWrite(OUTPUT_CHANNEL, LOW); delay(500); }
- Open File → New Sketch and enter the code. For MPINO or another MPAINO model, change
OUTPUT_CHANNELto the first output address in that model's pin map. - 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 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 indicator, first check the output test method in its manual.
5. Turn an Output On with an Input
This example reads MPAINO-8A8R(T) input 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.
const uint8_t INPUT_CHANNEL = 0; // MPAINO-8A8R(T) input example const uint8_t OUTPUT_CHANNEL = 64; // MPAINO-8A8R(T) output example void setup() { pinMode(INPUT_CHANNEL, INPUT); pinMode(OUTPUT_CHANNEL, OUTPUT); } void loop() { bool inputState = digitalRead(INPUT_CHANNEL); digitalWrite(OUTPUT_CHANNEL, inputState); }
Verify (✓) and Upload (→) the sketch. Connect the input signal according to the product manual. Change its state and check that the output state changes with it. MPAINO digital inputs have built-in pull-down resistors, so use INPUT. For MPINO, check the model's input circuit and pin map before choosing the addresses and input configuration.
6. If Something Does Not Work
| Symptom | What to check |
|---|---|
| The product is missing from board search | Check that ARDUINO SDK INSTALL ran, then restart Arduino IDE. |
| Verification reports an error | Read the error location in the output panel. Check the code for typos and confirm the selected board. |
| Upload fails | Check the board and COM port, the product's upload cable, and product power. |
| 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. |
