Giter VIP home page Giter VIP logo

controllino_library's People

Contributors

columbo818 avatar controllino-support avatar frhun avatar jirijasek avatar pmmarquez avatar sumpfralle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

controllino_library's Issues

Analog input Controllino Maxi pure

Hi everyone,
I want to use an analog sensor which delivers measurments with 4-20 mA current. Is it possible to use an analog input port of a Controllino Maxi pure ? What will be the value returned by the Controllino when I read it on the analog port ? Between 0 and 1023 ?
Thanks in advance for your answers,
Tristan @ Mugen

Debugging Controllino

Hello everybody, I have 2 question:
The first, most important: How can I debug a Controllino? I couldn't find any information on the datasheet and user manual...
The second: is Controllino compatible with MPLAB X IDE since I can work on Atmel MCU's with it?

Possibly Missing Dependency

I run Arduino 1.8.2 on Arch Linux x86_64,
i made a clean install of Arduino, the Controllino Hardware Description, and the Software Library.
But when I try to upload something to my Controllino Maxi Automation I get the error:

"/home/[USERNAME]/.arduino15/packages/arduino/tools/avrdude/6.0.1-arduino5/bin/avrdude: error while loading shared libraries: libreadline.so.6: cannot open shared object file: No such file or directory"

my "/home/[USERNAME]/.arduino15/packages/arduino/tools/avrdude/6.0.1-arduino5" folder has the following contents:
`.:
bin etc include lib

./bin:
avrdude avrdude_bin libusb-config

./etc:
avrdude.conf

./include:
libusb-1.0 usb.h

./include/libusb-1.0:
libusb.h

./lib:
libusb-0.1.so.4 libusb-0.1.so.4.4.4 libusb-1.0.a libusb-1.0.la libusb-1.0.so libusb-1.0.so.0 libusb-1.0.so.0.1.0 libusb.a libusb.la libusb.so pkgconfig

./lib/pkgconfig:
libusb-1.0.pc libusb.pc
`

I suspect this may be due to a missing dependency in the hardware description file, as the requested library is nowhere to be found.

RS485 ModbusRTU Reboot

Hello folks,
I had programmed something with rs485 and modbusRTU some time ago and just wanted to use it again.
Unfortunately without success.
Each time the Controllino (slave) is asked, it reboots. (Detection through an output in the setup and in the loop)
Then I copied the example (second one modbusRTU) on the website with two Controllino with the same result.
Has anyone experienced something similar or can someone help me.

Here is the example (second one)(first one works fine):
https://www.controllino.com/knowledge-base/rs485-modbusrtu/

Many thanks and greetings
orichienal

Pull-up for digital inputs in MAXI Automation results in low level

I am using a Controllino MAXI Automation.
I tried to use digital input pins with a configured pull-up resistor:

pinMode(SOME_PIN, INPUT_PULLUP);

But I am surprised that the pin headers of such digital inputs reach only a level of 1.3V (instead of being close to 5V). Thus I am forced to use analog inputs (with configured pull-up) and use a threshold of ca. 280 for distinguishing HIGH and LOW.

In contrast, the same setup works as expected (with a good HIGH level) with a Controllino Mini.

Is there a technical problem with the MAXI Automation devices with regard to pull-up resistors?
Or do you have an idea, what could have gone wrong with my device?

aREST Library compilation error since update in BSP v3.0.1

Hello everyone,

I'm facing a compilation issue since I updated my Controllino Maxi with BSP v3.0.1.

Previously it worked like a charm except the mapping PIN numbers were shifted (solved in v3.0.1 apparently).

I also updated the Ethernet Library in v2.0.0, ARest Library in 2.7.3 and Arduino IDE in v1.8.6 (previously 1.8.5).

aREST is a nice library to manage Arduino with REST requests.

I don't know what to do. Please help ;-)

Here's the errors:

Arduino : 1.8.6 (Windows 7), Carte : "CONTROLLINO MAXI"

G:\LABS\02_Arduino\TP_Ethernet_ARest_v4_controllino.ino\TP_Ethernet_ARest_v4_controllino.ino.ino: In function 'void loop()':

TP_Ethernet_ARest_v4_controllino.ino:60:21: error: no matching function for call to 'aREST::handle(EthernetClient&)'

G:\LABS\02_Arduino\TP_Ethernet_ARest_v4_controllino.ino\TP_Ethernet_ARest_v4_controllino.ino.ino:60:21: note: candidates are:

In file included from G:\LABS\02_Arduino\TP_Ethernet_ARest_v4_controllino.ino\TP_Ethernet_ARest_v4_controllino.ino.ino:16:0:

C:\Users\arnaud\Documents\Arduino\libraries\aREST/aREST.h:734:6: note: void aREST::handle(HardwareSerial&)

 void handle(HardwareSerial& serial){

      ^

C:\Users\arnaud\Documents\Arduino\libraries\aREST/aREST.h:734:6: note:   no known conversion for argument 1 from 'EthernetClient' to 'HardwareSerial&'

C:\Users\arnaud\Documents\Arduino\libraries\aREST/aREST.h:758:6: note: void aREST::handle(char*)

 void handle(char * string) {

      ^

C:\Users\arnaud\Documents\Arduino\libraries\aREST/aREST.h:758:6: note:   no known conversion for argument 1 from 'EthernetClient' to 'char*'

Plusieurs bibliothèque trouvées pour "Ethernet.h"
Utilisé : C:\Users\arnaud\Documents\Arduino\libraries\Ethernet
Non utilisé : C:\Program Files (x86)\Arduino\libraries\Ethernet
exit status 1
no matching function for call to 'aREST::handle(EthernetClient&)'

Here's the code

/*
  This a simple example of the aREST Library for Arduino (Uno/Mega/Due/Teensy)
  using the Ethernet library (for example to be used with the Ethernet shield).
  See the README file for more details.

  Written in 2014 by Marco Schwartz under a GPL license.
*/
// Libraries
#include <Controllino.h>
#include <Ethernet.h> 
#include <SPI.h>
#include <avr/wdt.h>
#include <aREST.h>

byte mac[] = { 0x90, 0xA2, 0xDA, 0x0E, 0xFE, 0x42 };
IPAddress ip(192,168,1,109);

// Ethernet server
EthernetServer server(80);

// Create aREST instance
 aREST rest = aREST();

// Variables to be exposed to the API
int temperature;
int humidity;
String Uri;

void setup(void)
{
  // Initialisation des variables
  Uri = String();
  temperature = 0;
  
  // Start Serial
  Serial.begin(115200);

   // Give name & ID to the device (ID should be 6 characters long)
  rest.set_id("008");
  rest.set_name("geek_n_co");

  // Start the Ethernet connection and the server
  // Setting static IP Address
    Ethernet.begin(mac, ip);

  server.begin();
  Serial.print("server is at ");
  Serial.println(Ethernet.localIP());

  // Start watchdog
  wdt_enable(WDTO_4S);
}

void loop() {
    // listen for incoming clients
  EthernetClient client = server.available();
  rest.handle(client);
  wdt_reset();
}

UPGRADE TO NEW BSP VERSION 3.0.1 AVAILABLE

Hi there,

I'm pretty noob in the Controllino's world and pardon my ignorance but what BSP stands for?

How can determine my current BSP version number and how can I upgrade?

Thanks in advance.

ISR USART3_RX_vect Error: multiple definition of `__vector_54'

Hallo,

i have programmed a DMX reciever on a Controllino MEGA over the RS 485 interface. The compiler crashes with the error: multiple definition of `__vector_54'

It compiles, when I comment out the ISR in my ino-file.
ISR (USART3_RX_vect) {//Do something}

Or it compiles, when I leave my ISR as it is and comment out the initialization routine of the RS 485 in the Controllino.cpp and Controllino.h.
char Controllino_RS485Init( long aBaudrate )

I hope there will be a clever adaption, so I don't have to modify the library manually.

btw:
I use the latest library (3.0.4) and board package version (3.0.2).

Wrong pin ID in for screw terminals of MINI's relays

I am using a MINI device.

In order to use two of the relays, I had to overwrite two defines:

#define CONTROLLINO_SCREW_TERMINAL_RELAY_00 4                                                       
#define CONTROLLINO_SCREW_TERMINAL_RELAY_02 6                                                       

The original values seem to be:

#define CONTROLLINO_SCREW_TERMINAL_RELAY_00 8
#define CONTROLLINO_SCREW_TERMINAL_RELAY_02 4

Or maybe I am just misinterpreting the pinout or the labeling?
I would be glad, if you could verify this.

Controllino Capacitive Library

Hello!
I am trying to use capacitive sensing function in controllino.
I am able to use it in Arduino with the following codes with serial reading.
<CapacitiveSensor.h>

CapacitiveSensor cs_4_2 = CapacitiveSensor(4,2);

I have imported the library to controllino but there are no results. Even added resister to both input A4 and A2 pins.
I am using screw terminal for CONTROLLINO MINI.
<CapacitiveSensor.h>

CapacitiveSensor cs_4_2 = CapacitiveSensor(CONTROLLINO_A4,CONTROLLINO_A2)

Can anyone help with the codes and wiring?
I am stuck for 3 weeks with no progress.
My intention is to have capacitive function and several sensor input that is why I choose controllino plc.
Thanks a lot!!

AD Converter reports different values depending on the operating voltage (12V/24V)

I connect a voltage source to the A4 Pin on the top of the controllino. The source is at 2V (measured with multimeter).

The controllino voltage reference is defined as INTERNAL2V56.

I power the controllino with USB or 12V (no difference):

  • analog read reports ~765

I power the controllino with 24V:

  • analog read reports ~735

What just happend? Not only that the behavior is unexpected, it also leads to wrong volatges measured.
Because 765 yields another voltage as 735 (765 beeing correct in that case).

I think this is a big bug. Do you know any solutions to this problem?

// EDIT: That also happens when using an external reference
// EDIT2: There is also another problem with the external reference: connecting 2.48V reference yields to ~2.2V beeing 1024 at the AD converter. So somehow 0.18V getting lost on the way to the chip

Controllino Mega Digital Pin 20 to 23

Hi,
how can i change the state of the pins mentioned in the title? Is it only possible with port manipulation?

Is there a way to add these pins to the library?

greetings

How to get JTAG working with Controllino Maxi

I know how to connect my ATmel-Ice to get ISP working on the Controllino. However, connecting to the JTAG Pins with JTAG-Fuse enabled and BOOTRST Fuse disabled is not working.

Is there a way to use JTAG with the Controllino Hardware?

vscode+PlatformIO does not flash when delay(variableName) is used. delay(100) works.

This code compiles but does not flash:

#include <Arduino.h>
#include <Controllino.h>  

unsigned long valveCycleTime = 20;

void setup() {  
  pinMode(CONTROLLINO_D0, OUTPUT);
  
  digitalWrite(CONTROLLINO_D0, HIGH);   
  delay(valveCycleTime);                                          //THIS IS THE PROBLEMATIC LINE    
  digitalWrite(CONTROLLINO_D0, LOW);    
  delay(100);   
}

void loop() {}

When changed to delay(100) it compiles and flashes no problem.

Using int or uint32_t does not seem to matter.

remotely programming

Is there any way to program the controllino over ethernet?
I have my controllinos connected to my internal network and I would like to script updates without having physical access to them.
thanks

Strange Issue When Using AREF to measure 1.1V Bandgap

Hello,

I am experiencing a strange issue when using the AREF pin (External Analog Reference) to measure the 1.1V internal reference bandgap voltage, and am curious if you could share how AREF is connected internally.

Looking at the manual on P.269, the ATMega chip has an internal 1.1V Bandgap reference. However, the manual says it is only accurate to within +/-0.1V!

It should be possible to read that reference voltage like any other ADC pin, by merely setting the ADC's internal Mux. That works, and using the normal AVcc reference voltage, everything works. However, when using AREF, it mis-reads the bandgap as higher by almost 200mv! What makes it strange is that effect happens even if Vcc is connected to AREF.

This may be an ATMega design flaw, but I am curious how AREF is handled internally. Is there just a capacitor between it and ground, or is there anything else on the front end pin-header board that may be causing the issue?

It would be possible to check for front end effects by bridging AREF and AVcc together with the front end board removed. However, I really do not want to risk doing something like that.

Example Code (from someone else) for measuring the bandgap using AVcc. Remove _BV(REFS0) to use AREF as the source instead.

ethernet bootloader

Tried to use ardiane ethernet bootloader for the Maxi Automation via MEGA 2560 ISP without luck. Is there a ready to use ethernet bootloader?

Wrong pins assignment in Controllino.h

Hi,

The pins are wrong assigned inside Controllino.h for MEGA

Wrong:
#define CONTROLLINO_PIN_HEADER_DIGITAL_IN_16 18
#define CONTROLLINO_PIN_HEADER_INT_00 18
#define CONTROLLINO_SCREW_TERMINAL_DIGITAL_IN_16 18
#define CONTROLLINO_SCREW_TERMINAL_INT_00 18

#define CONTROLLINO_PIN_HEADER_DIGITAL_IN_17 19
#define CONTROLLINO_PIN_HEADER_INT_01 19
#define CONTROLLINO_SCREW_TERMINAL_DIGITAL_IN_17 19
#define CONTROLLINO_SCREW_TERMINAL_INT_01 19

Correct:
#define CONTROLLINO_PIN_HEADER_DIGITAL_IN_16 38
#define CONTROLLINO_SCREW_TERMINAL_DIGITAL_IN_16 38

#define CONTROLLINO_PIN_HEADER_DIGITAL_IN_17 39
#define CONTROLLINO_SCREW_TERMINAL_DIGITAL_IN_17 39

#define CONTROLLINO_PIN_HEADER_DIGITAL_IN_18 40
#define CONTROLLINO_SCREW_TERMINAL_DIGITAL_IN_18 40

#define CONTROLLINO_PIN_HEADER_INT_00 18
#define CONTROLLINO_SCREW_TERMINAL_INT_00 18

#define CONTROLLINO_PIN_HEADER_INT_01 19
#define CONTROLLINO_SCREW_TERMINAL_INT_01 19

Controllino MAXI + Interrupts

Hello,

I'm having trouble getting interrupts to work on the Controllino MAXI. I've tested the same code in an Arduino Mega and it works as expected. Can you tell me if the following code should work on the Controllino?

#include "Controllino.h"

#define MY_INT_PIN CONTROLLINO_IN0 // 18 in Arduino Mega

volatile byte in0_state = HIGH;

void in0_program_run_handler() {
  in0_state = LOW;
}

void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }
  
  pinMode(MY_INT_PIN, INPUT_PULLUP);
  attachInterrupt(digitalPinToInterrupt(MY_INT_PIN), in0_program_run_handler, CHANGE);
}

void loop() {
  if(LOW == in0_state) {
    in0_state = HIGH;
    Serial.println("Hello!");
  }
}

Thanks in advance.

Updates needed to support Ethernet version 2.0.0 library

I recently released version 2.0.0 of the Arduino Ethernet library.

The good news is version 2.0.0 greatly improves ethernet performance with the W5100 chip. It's about 8 times faster (on 8 bit AVR) for TCP to hosts on the same LAN. Speed to internet connected hosts varies, but it's still a dramatic improvement over prior versions. More details at these pages:

https://github.com/arduino-libraries/Ethernet/releases/tag/2.0.0
https://www.pjrc.com/arduino-ethernet-library-2-0-0/

The bad news: at least 3 of your customers have reported incompatibility with Controllino.

Ethernet 2.0.0 requires 2 minor updates in your board support package.

1: You need to assign a digital pin number for PJ2. Really, all that's required is adding an entry in the digital_pin_to_port_PGM[] and digital_pin_to_bit_mask_PGM[] arrays in variants/mega/pins_arduino.h. If you simply add PJ2 to the end of these 2 arrays, then PJ2 will become digital pin 70.

2: In your pins_arduino.h file, add this line to tell Ethernet 2.0.0 to use pin 70 for the CS signal:

#define PIN_SPI_SS_ETHERNET_LIB 70

With these changes, Ethernet 2.0.0 should "just work" with your Controllino products.

Or, if you prefer, just copy the latest Ethernet and patch the chip select code in w5100.h, as you have done with prior versions.

However, PIN_SPI_SS_ETHERNET_LIB is meant to give you a long-term stable way to configure which pin the Ethernet library uses for chip select on your board, so you won't need to keep patching the library as we update it and add new features.

Unix Time stamp?

Hi everyone,

is it possible to get the unix time stamp from the built in realtime clock? It would be cool for countdowns, etc.

Unclear if RTC alarm functionality is in 3.07 or not

Both this example and the instructions here tells me that there is RTC alarm functionality implemented.

I have the latest version, 3.0.7 installed in PlatformIO / vsCode and it just gives me a standard 'Controllino_ClearAlarm' was not declared in this scope when I try to compile code with Controllino_ClearAlarm() or Controllino_SetAlarm(int, int).

Downloaded the 3.0.7 source and had a look, no alarms found there either.

Am I blind/stupid or is it simply something for 3.0.8?

Thanks!

Modbus RTU library

I would like to implement a control over several Modbus RTU modules in Controllino.

This repository gives some examples, but they are somewhat outdated and even dangerous. For example, the following code found in ModbusRtu.h

        while ( port->available() )
        {
            au8Buffer[ u8BufferSize ] = port->read();
            u8BufferSize ++;

            if (u8BufferSize >= MAX_BUFFER) bBuffOverflow = true;
        }

...doesn't stop on buffer overflow and may just spoil memory beyond 64-byte au8Buffer occasionally. I believe such mistakes should never occur in a code for an industrial-grade PLC.

I found a few other libraries, however they will not work directly because of the non-standard pins.

Can you recommend any Modbus RTU library that works well with Controllino?

If there is none, probably it is a good idea to write one and include for all Controllino users. I'm ready to contribute to the code.

CONTROLLINO MEGA unknown during compiling

Hello,
I'm working on CONTROLLINO MEGA Platform with Arduino 1.8.0 IDE.
I'hadn't any problem in code compiling before this morning.
Despite I follow the right procedure for installing hardware, now, when I try to compile my code, I get this error

"Board controllino_mega (platform avr, package CONTROLLINO_Boards) unknown"

(sorry, I translate it from italian ...)

I can see correctly the list of controllino boards in "Boards Manager" and select them, but at this moment, I can't compile with anything (and so my job is in stand-by ...)

Thanks for your attention

Error in wire library when compiling a sketch

After upgrading to new BSP Version 2.0.0, compiling a sketch isn't possible anymore.

Error-Log: "Library can't use both 'src' and 'utility' folders. Double check C:\Users\Ulli\Documents\ArduinoData\packages\CONTROLLINO_Boards\hardware\avr\2.0.0\libraries\Wire"

I substituted this Wire Library with the Wire-Library in "c:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.6.0_x64__mdqgnx93n4wtt\hardware" and the sketch was successfully compiled.

Because the compare of the both Wire Libraries shows some minor differences, I don't want to upload the sketch to the Controllino.

Please correct the problem in the BSP Wire Library.

input pins

Hi I need to connnect the controllino input pins to a simple switch - it is a spring loaded switch that makes contact when you press it but then opens again and opens the contact.

I just need to detect logical 1 or 0 on the input - the following pins -

82 -97 and 50,52,70

do I need external resistors to make this work reliably? I'd like to avoid putting another board.

if this is not the right place to ask this question please point me to the right place. I have read the documents and the pinout related drawings but I can't tell if you have something built into the board to allow me to work without additional external resistors

thanks

searchingFool :)

Controllino boards not found

Hello,
I have an issue with instaling Controllino boards on Arduino IDE. I did all steps that are required (install Controllino library, paste URL in Preferences), but when I open Board Manager and type in search CONTROLLINO nothing shows up. Does anyone have any idea why and how can I fix this?

image

Add documentation about Ethernet

I bought a Controllino MAXI and I had difficulties connecting through Ethernet. Ethernet.localIP() always returned 255.255.255.255.

The problem was due to the fact that Arduino IDE linked the standard Ethernet library and not Controllino's one (it appeared in the compilation logs of Arduino IDE). Under ArchLinux, I manually replaced ~/Arduino/libraries/Ethernet by Controllino's Ethernet folder (~/.arduino15/packages/CONTROLLINO_Boards/hardware/avr/2.0.1/libraries/Ethernet/src) and it worked.

You may complete the Learning page with such a procedure.

avrdude: verification error

Hello,

maybe this issue is not related to the Controllino itself.
Since yesterday I have one Controllino Mini for testing and I get an error while uploading the sketch. After checking the internet I found several reports about this bug and I also tried the FAQ 10 to solve this issue, but without success.

Here is my sketch, that produces the error:
`#include <Controllino.h>

int t1 = 100;
int t2 = 2000;
int t3 = 5000;

void setup() {

pinMode(CONTROLLINO_D0, OUTPUT);
pinMode(CONTROLLINO_D3, OUTPUT);
}

void loop() {

digitalWrite(CONTROLLINO_D0, HIGH);
delay(2000);
digitalWrite(CONTROLLINO_D0, LOW);
delay(5000);

digitalWrite(CONTROLLINO_D3, HIGH);
delay(100);
digitalWrite(CONTROLLINO_D3, LOW);
delay(2000);

}

For me, it looks that the delay is not handled correctly for whatever reason. If I use the same time for all the delays, it is working.

I tried one further solution and this is also working, but with the same delay as in the non working sketch from above.

`#include <Controllino.h>

int t1 = 100;
int t2 = 2000;
int t3 = 5000;

void setup() {

pinMode(CONTROLLINO_D0, OUTPUT);
pinMode(CONTROLLINO_D3, OUTPUT);
}

void loop() {

digitalWrite(CONTROLLINO_D0, HIGH);
delay(t2);
digitalWrite(CONTROLLINO_D0, LOW);
delay(t3);
digitalWrite(CONTROLLINO_D3, HIGH);
delay(t1);
digitalWrite(CONTROLLINO_D3, LOW);
delay(t2);

}`

Here I defined variables outside the loop and than it is compiling and uploading without an issue.

Before I used an Arduino nano without a problem, so this was new for me. What kind of software do I have install, right now I am using the latest Arduino IDE and the suggested setup in the manual. Or is this the correct way to handle the delay settings. Do you need more informations, maybe this issue entry is connected to #31, not sure. Do you need further info?

Board Library

capture2

I am having trouble getting the board library to load. Everything else is installed properly.

Thanks.

Please move examples to separate folder

Hello, I've recently installed CONTROLLINO library by Arduino IDE 2, and it seems that it does not recognize examples that are not in the "examples" folder. It also applies to PlatformIO in VS Code. So I suggest moving all folders with examples to "examples/" folder...

Controllino IoT on AWS

Hi, I was wondering if it's possible to upload data on AWS IoT server using just Controllino via built in Ethernet port but I couldn't find any answer on the web and in Controllino documentations. Also tried to look for WIZnet 5100 and AWS compatibility but nothing.
How can I be sure that's possible to upload and receive datas from AWS IoT using a Controllino?
What should I check?
Anyone tried that?
I know also that AWS have some restrictions about security certificates if it can helps...
Any answer is welcome!

BR,
Simone

Compilation issue for MAXI Automation.

I am having a compilation issue since the 3.03 update that gives the following error.

E:\Libraries\Documents\Arduino\libraries\CONTROLLINO\Controllino.cpp: In function 'uint16_t date2days(uint16_t, uint8_t, uint8_t)':
E:\Libraries\Documents\Arduino\libraries\CONTROLLINO\Controllino.cpp:405:31: error: 'daysInMonth' was not declared in this scope
         days += pgm_read_byte(daysInMonth + i - 1);
                               ^
exit status 1
Error compiling for board CONTROLLINO MAXI Automation.

Controllino Maxi Automation 10V Analog Input

Hi Everyone,

I am using the Controllino Maxi Automation to receive a 0-10V analog Input and to send the corresponding 10 bit Value to another device.

If I set the Input Voltage to 0V I receive 0 and if I set it to 10V I receive 1023 so all is good at both ends.
Where I have the problem is all the Values in between, for some reason the analog input data is not converted to the correct 10 bit value e.g. with a input voltage of 0.5V I receive an outgoing value of 49 while I believe it should be 51.2 and with a input voltage of 8V I receive an outgoing value of 835 which should be 818.4.

Do you have any idea for why this is happening?
Is there anything specific I have to keep in mind while using the 10V analog Input?

Tristan

Controllino Ethernet

Hello Controllino-Support.
I am using your Controllino Maxi Automation.
Unfortunately I cannot reach the device within the network, since Ethernet.begin() fails and returns with 0. The network setup has a DHCP server - so the device should have an IP assigned to it.

What I also tried was the call Ethernet.hardwareStatus() - returning EthernetNoHardware return.

Could you help me with this? What am I doing wrong here?

Thank you so much and best regards,

ADC reading higher than it should be

Hi,

I'm using the analogRead function to just print the ADC representation of the signal. I know that the range of values @24v is 0-26.4V and for a safety reserve (which I don't completely understand) the ADC actually uses a reference(?) of 31V?

So 0->31V is mapped onto 0->1023. That's understood.

So I expected 24V to be (31/1023)/24 = 792 but instead its 825. Is my understanding wrong? For 12.3V it gives 417 when I think it should be 410?

Also what does the scaling factor mean? It's the last couple lines in the below snippet
image

Connecting ESP8266 via IN1 and IN0 fails

Hi there,

I'm trying to connect an ESP8266-01 module to my Controllino MEGA. However, when I connect the TX and RX pins of the ESP to the appropriate IN1 and IN0 respectively, I get no reaction when I try to enter AT-commands via the serial connection. The IN1 and IN0 pins works the same way as the pin 19(RX1) and pin 18(TX1) on a standard Arduino Mega. I have verified that the ESP-module works as intended via a regular Arduino Mega, yet it doesn't work on the Controllino.

I use a very simple script like so to create two serial connections, so that I can use the serial input in the Arduino IDE as a command line:

void setup() {
  Serial.begin(9600);
  Serial1.begin(115200);

  Serial.println("Ready for input");
}

void loop() {
while (Serial.available()){
  char ch = Serial.read();
  Serial1.print(ch);
  }

while (Serial1.available()){
  char ch = Serial1.read();
  Serial.print(ch);
  }
}

Any help would be greatly appreciated, as I have not been able to identify the issue. Is it because I need to define the interrupt pins to a specific state?

Typo on Readme.md

Please note that RS485 interface is present ony in MAXI and MEGA variants.

Should read

Please note that RS485 interface is present only in MAXI and MEGA variants.

Error using Controllino libraries in Arduino Web Editor

I have tried to use Arduino Create (web editor of Arduino), with Controllino and I have not been able to compile the examples. I think that the problem is that:

  1. Online editor recognises the board as Arduino Mega but it does not allow to load aditional boards as in the IDE.
  2. When compiling the program, I get this error:

/home/admin/builder/opt/libraries/latest/controllino-1-1-2/Controllino.h:42:10: error: #error Please, select one of the CONTROLLINO variants in Tools->Board

#error Please, select one of the CONTROLLINO variants in Tools->Board

Support in IDE 2.0 and arduino-cl

Hi folks,

So I'm discovering the world of both arduino and PLC, so I'm not well equipped to figure things out on my own.

I have a controllino that work great with arduino IDE 1.8.x and with which we are controlling our machine.

Now, being a software engineer, I like

  • living on the edge, with the latest version (arduino IDE 2.0)
  • using CLI tools (arduino-cli)

With both those tools, I'm able to use "regular" arduino board, but when using controllino, I get the same error in both environments:

Compilation error: Error: 2 UNKNOWN: fork/exec /Users/gbataille/Library/Arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.3-arduino2/bin/avr-g++: bad CPU type in executable

with arduino-cli, I can get a verbose output (that does not seem much helpful)

gbataille ~/Doc…DC/BiU_Corn/plc [1] $ arduino-cli compile --fqbn CONTROLLINO_Boards:avr:controllino_mega controllino --verbo
se
Using board 'controllino_mega' from platform in folder: /Users/gbataille/Library/Arduino15/packages/CONTROLLINO_Boards/hardware/avr/3.1.0
Using core 'arduino' from platform in folder: /Users/gbataille/Library/Arduino15/packages/arduino/hardware/avr/1.8.3
Detecting libraries used...
/Users/gbataille/Library/Arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.3-arduino2/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -I/Users/gbataille/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/cores/arduino -I/Users/gbataille/Library/Arduino15/packages/CONTROLLINO_Boards/hardware/avr/3.1.0/variants/Controllino_mega /var/folders/cx/327j2f6j2j19z_tyjz5gqmtc0000gp/T/arduino-sketch-3F38DC76432B994275324F06CC5233C0/sketch/controllino.ino.cpp -o /dev/null

Error during build: fork/exec /Users/gbataille/Library/Arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.3-arduino2/bin/avr-g++: bad CPU type in executable

I have the intuition that it comes from the board definition file, but I would not know how that works.

Would you know?
Are those tools really not supported or is it just a matter of a small configuration?

Thanks

Question: Monitoring the 24V

Is it possible to monitor the 24V voltage? I connected the controller to USB and when I restart my machine, the controller keeps running because of the USB supply?
Thanks!

Interrupts from Ethernet

Hi! I have the controllino maxi automation and I was wondering if there's anyway to use generate an interrupt when the ethernet receives data?

I did see this article for the WS100 chip but it requires soldering a jumper to the pin.

Allow selection of board library version

Hi,

Is there a way you guys could add the ability for the user to choose the Controllino Library version through the IDE?

I ask because sometimes the codebase for a project could have been done using version 1.1.0 of the library, and using the new version causes issues.

javaw_2017-09-14_07-57-55

As an alternative I've tried to force the Arduino IDE to load the library version 1.1.0 by placing it in the sketch folder, but I haven't had any luck in getting that to work.

Regards,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.