FLEXBOOL programming iseasyintuitiveopen...

    FLEXBOOL PLC is based on ESP32 processor and fully compatible with ARDUINO IDE. Thus аll Arduino math and logic functions as well as many Arduino libraries are compatible and can be used in your code. The reference below describes the specific FLEXBOOL functions you can use for procеssing the input data, SD Card, Real Time Clock, Built In battery charger, panel display, panel LED indicators, output control and communication with other devices.
    If this is your first project with FLEXBOOL please watch our FIRST STEPS short video, which describes the main FLEXBOOL features and explains the first steps in using the PLC. On the video page, you will also find a JSON file URL for Arduino IDE Preferences window.

    FLEXBOOL INPUTS

    ANALOG INPUTS (0-10V)

    Analog Inputs: AI[0] - AI[7]

    Functions: AI_GET (channel_No)

    Examples: float volt = AI_GET (3), or 
                        float volt = AI_GET (AI[3])

    The AI_GET() function returns the value of the input voltage (float in Volts). FLEXBOOL Analog Inputs are processed by a 12-bit ADC.

    Image
    * All Analog Inputs are over-voltage and over-current protected.
    ** When necessary, all Analog Inputs can be used as an additional Digitall Inputs.
    ***
     Depending on your project needs, the PLC panel LED indicator corresponding to each analog input can be configured to be active when the measured value is higher, or lower than a specified limit. See the Panel LED functions for more information.
    CURRENT INPUTS (0-20mA)
    DIGITAL INPUTS
    RTD INPUTS (PT100, Cu100, Cu50)
    NTC INPUTS (thermistors 1 - 10k)

    FLEXBOOL OUTPUTS

    DIGITAL OUTPUTS

    Digital Outputs: DO[0] - DO[7]

    Functions: 
    DO_SET (channel_No, state)
    DO_GET (channel_No)

    Examples:
    DO_SET (3, 1), or
    DO_SET (DO[3], 1)

    bool state = DO_GET (3), or
    bool state = DO_GET (DO[3])

    Image
    The DO_SET() function has 2 arguments: channel number (DO[0] - DO[7]) and the new output state(0, 1).

    The DO_GET() function has 1 argument: the channel number (DO[0] - DO[7]). It returns the current state of the output (0, 1).

    FLEXBOOL Digital Outputs are rated for 200mA and over-current protected.
    ** Depending on your project needs, the PLC panel LED indicator corresponding to each digital output can be configured to be active when the output value is High, or Low. See the Panel LED functions for more information.
    RELAY OUTPUTS (5A)
    PWM OUTPUTS
    ANALOG OUTPUTS (0-10V)

    COMMON FUNCTIONS

    REAL TIME CLOCK (RTC)
    FLEXBOOL PLC has an internal Real Time Clock/Calendar that allows you to create Alarm/Event Logs, keep track of operating hours, set reminders and notifications for the system user, and initiate various periodic processes of controlled equipment (defrost, periodic self-cleaning, bearing lubrication, water treatment, tank ventilation, etc.).
    Functions: 
    RTC_GET (time_parameter)
    RTC_SET (time_parameter, value)

    The RTC_SET() function has 2 arguments: time parameter and value. Available time parameters are as follows: Year, Month, Date, WeekDay, Hour, Minute, Second. as Allowed integer values are as follows: numbers 1-12 (for month), 1-31 (for date) 0-24 (for hour), 0-60 (for minutes and seconds), 1-7 (for weekdays).

    The RTC_GET() function returns the value of the requested time parameter.
    Image
    Examples:
    RTC_SET (Year, 2022);
    RTC_SET (Month, 8);
    RTC_SET (Date, 29);
    RTC_SET (WeekDay, 1);       // 1 - MON, 2 - TUE, ... 7 - SUN
    RTC_SET (Hour, 16);
    RTC_SET (Minute, 10);
    RTC_SET (Second, 0);
    int myTime[7];
    myTime[0] = RTC_GET (Year);
    myTime[1] = RTC_GET (Month);
    myTime[2] = RTC_GET (Date);
    myTime[3] = RTC_GET (WeekDay);
    myTime[4] = RTC_GET (Hour);
    myTime[5] = RTC_GET (Minute);
    myTime[6] = RTC_GET (Second);
    * FLEXBOOL RTC is supplied by an internal capacitor backup supply that provides reliable RTC operation in case of a power break for up to 60 days.
    SD MEMORY CARD
    UPS BATTERY CHARGER
    PANEL LEDs
    PANEL DISPLAY
    PANEL BUTTONS
    EXT CONNECTOR I/O

    COMMUNICATION

    RS485
    As an industrial standard for long-distance communication, the RS485 port of FLEXBOOL PLC provides anti-interference, and reliable operation. It is based on MAXIM MAX13487 transceiver, which features reduced slew-rate drivers that minimize EMI and reduce reflections caused by improperly terminated cables, allowing error-free transmission up to 500kbps. The AutoDirection feature of the MAX13487 provides faster switching speeds, no contact bounce, better reliability, and better electrical isolation.

    The RS485 communication port of FLEXBOOL PLC is routed to the upper left pluggable terminal (see the pinout diagram) as well as to the front panel EXT connector. The port is surge protected and internally terminated by a 120 Ohm resistor.
    Starting/stopping the RS485 communication can be done as follows:

    RS485.begin (BaudRate);
    RS485.end();

    Note that serial  communication Receive and Transmit pins are hardcoded in the FLEXBOOL core and should not be defined when the RS485 communication is started.

    Example:

    RS485.begin (9600);

    byte RS485_DATA_SENT = 0x11;
    RS485.write (RS485_DATA_SENT);
    Serial.print ("Sent data over RS485: ");
    Serial.println (RS485_DATA_SENT);

    Serial.print ("Received data on RS485: ");
    if (RS485.available()) {
    byte RS485_DATA_RECEIVED = RS485.read();
    Serial.println (RS485_DATA_RECEIVED);
    Image
    UART
    ETHERNET
    WiFi
    BLUETOOTH
    SPI
    I2C

    SERVICE FUNCTIONS

    DEBUG MODE
    The DEBUG_MODE is a global variable that allows the developer to choose between 3 different levels of reporting (serial printing) the controller status, events and errors:
    DEBUG_MODE = 0
    Default (normal operation mode). No serial prints are allowed for device status and alarms.
    DEBUG_MODE = 1
    Warnings and configuration errors will be printed.
    DEBUG_MODE = 2
    Warnings and configuration errors will be printed as well as all configuration events, device initialization report and self check results.
    * In order to receive all configuration messages, event notifications and self check results, the DEBUG_MODE level must be set before the INIT_CONTROLLER() function in your code.
    HARDWARE CHECK
    SIGNAL CONDITIONING
    ® 2024 FLEXBOOL. All Rights Reserved.