• Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. relristein

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website
    R
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 6
    • Best 0
    • Controversial 0
    • Groups 0

    relristein

    @relristein

    0
    Reputation
    597
    Profile views
    6
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    relristein Unfollow Follow

    Latest posts made by relristein

    • RE: LOOP - BLINK -MODBUS RTU

      Sorry.
      Where I could enter this topic?

      tank's

      posted in Modbus4J general discussion
      R
      relristein
    • RE: Arduino and Mango Step by step working example

      Hi,

      I have a one question. I use the modbus serial for comunication. It is script:

      #include <ModbusSlave.h>
      /* First step MBS: create an instance /
      ModbusSlave mbs;
      /
      slave registers */
      enum {

      MB_CTRL, /* Led control on, off or blink /
      MB_TIME, /
      blink time in milliseconds /
      MB_CNT, /
      count the number of blinks /
      MB_REGS /
      total number of registers on slave */

      };

      int regs[MB_REGS];
      int ledPin = 13;

      void setup()
      {

      /* the Modbus slave configuration parameters /
      const unsigned char SLAVE = 1;
      const long BAUD = 9600;
      const char PARITY = 'n';
      const char TXENPIN = 1;
      /
      Second step MBS: configure */
      mbs.configure(SLAVE,BAUD,PARITY,TXENPIN);
      pinMode(ledPin, OUTPUT);

      }

      void loop()

      {

      /* Third and las step MBS: update in loop*/

      mbs.update(regs, MB_REGS);

      if(regs[MB_CTRL]==1)

      {

      digitalWrite(ledPin,1);

      }

      else{

      digitalWrite(ledPin,0);

      }

      }


      But i want a blink effect in led and i modified the script:

      if(regs[MB_CTRL]==1)
      {
      digitalWrite(ledPin,1);
      delay(3000);
      digitalWrite(ledPin,0);
      delay(3000);
      }
      else{
      digitalWrite(ledPin,0);
      }
      }

      Well, when i set the bit 1, the led blink but it don't enter in the else.

      Anyone had the same problem with supervisory and script?

      tank's

      *sorry, my english is very weak.

      posted in How-To
      R
      relristein
    • LOOP - BLINK -MODBUS RTU

      Hi,

      I have a one question. I use the modbus serial for comunication. It is script:

      #include <ModbusSlave.h>
      /* First step MBS: create an instance /
      ModbusSlave mbs;
      /
      slave registers */
      enum {

      MB_CTRL, /* Led control on, off or blink /
      MB_TIME, /
      blink time in milliseconds /
      MB_CNT, /
      count the number of blinks /
      MB_REGS /
      total number of registers on slave */

      };

      int regs[MB_REGS];
      int ledPin = 13;

      void setup()
      {

      /* the Modbus slave configuration parameters /
      const unsigned char SLAVE = 1;
      const long BAUD = 9600;
      const char PARITY = 'n';
      const char TXENPIN = 1;
      /
      Second step MBS: configure */
      mbs.configure(SLAVE,BAUD,PARITY,TXENPIN);
      pinMode(ledPin, OUTPUT);

      }

      void loop()

      {

      /* Third and las step MBS: update in loop*/

      mbs.update(regs, MB_REGS);

      if(regs[MB_CTRL]==1)

      {

      digitalWrite(ledPin,1);

      }

      else{

      digitalWrite(ledPin,0);

      }

      }


      But i want a blink effect in led and i modified the script:

      if(regs[MB_CTRL]==1)
      {
      digitalWrite(ledPin,1);
      delay(3000);
      digitalWrite(ledPin,0);
      delay(3000);
      }
      else{
      digitalWrite(ledPin,0);
      }
      }

      Well, when i set the bit 1, the led blink but it don't enter in the else.

      Anyone had the same problem with supervisory and script?

      tank's

      *sorry, my english is very weak.

      posted in Modbus4J general discussion
      R
      relristein
    • RE: LOOP - BLINK -MODBUS RTU

      Hi,

      I have a one question. I use the modbus serial for comunication. It is script:

      #include <ModbusSlave.h>
      /* First step MBS: create an instance /
      ModbusSlave mbs;
      /
      slave registers */
      enum {

      MB_CTRL, /* Led control on, off or blink /
      MB_TIME, /
      blink time in milliseconds /
      MB_CNT, /
      count the number of blinks /
      MB_REGS /
      total number of registers on slave */

      };

      int regs[MB_REGS];
      int ledPin = 13;

      void setup()
      {

      /* the Modbus slave configuration parameters /
      const unsigned char SLAVE = 1;
      const long BAUD = 9600;
      const char PARITY = 'n';
      const char TXENPIN = 1;
      /
      Second step MBS: configure */
      mbs.configure(SLAVE,BAUD,PARITY,TXENPIN);
      pinMode(ledPin, OUTPUT);

      }

      void loop()

      {

      /* Third and las step MBS: update in loop*/

      mbs.update(regs, MB_REGS);

      if(regs[MB_CTRL]==1)

      {

      digitalWrite(ledPin,1);

      }

      else{

      digitalWrite(ledPin,0);

      }

      }


      But i want a blink effect in led and i modified the script:

      if(regs[MB_CTRL]==1)
      {
      digitalWrite(ledPin,1);
      delay(3000);
      digitalWrite(ledPin,0);
      delay(3000);
      }
      else{
      digitalWrite(ledPin,0);
      }
      }

      Well, when i set the bit 1, the led blink but it don't enter in the else.

      Anyone had the same problem with supervisory and script?

      tank's

      *sorry, my english is very weak.

      posted in Modbus4J general discussion
      R
      relristein
    • LOOP - BLINK - AUTOMATION

      Hi,

      I have a one question. I use the modbus serial for comunication. It is script:

      *#include <ModbusSlave.h>
      /
      First step MBS: create an instance /
      ModbusSlave mbs;
      /
      slave registers */
      enum {

      MB_CTRL, /* Led control on, off or blink /
      MB_TIME, /
      blink time in milliseconds /
      MB_CNT, /
      count the number of blinks /
      MB_REGS /
      total number of registers on slave */

      };

      int regs[MB_REGS];
      int ledPin = 13;

      void setup()
      {

      /* the Modbus slave configuration parameters /
      const unsigned char SLAVE = 1;
      const long BAUD = 9600;
      const char PARITY = 'n';
      const char TXENPIN = 1;
      /
      Second step MBS: configure */
      mbs.configure(SLAVE,BAUD,PARITY,TXENPIN);
      pinMode(ledPin, OUTPUT);

      }

      void loop()

      {

      /* Third and las step MBS: update in loop*/

      mbs.update(regs, MB_REGS);

      if(regs[MB_CTRL]==1)

      {

      digitalWrite(ledPin,1);

      }

      else{

      digitalWrite(ledPin,0);

      }

      }**


      But i want a blink effect in led and i modified the script:

      if(regs[MB_CTRL]==1)
      {
      digitalWrite(ledPin,1);
      delay(3000);
      digitalWrite(ledPin,0);
      delay(3000);

      }
      else{
      digitalWrite(ledPin,0);
      }
      }

      Well, when i set the bit 1, the led blink but it don't enter in the else.

      Anyone had the same problem with supervisory and script?

      tank's

      *sorry, my english is very weak.

      posted in Wishlist
      R
      relristein
    • RE: LOOP - BLINK - AUTOMATION

      Hi,

      I have a one question. I use the modbus serial for comunication. It is script:

      *#include <ModbusSlave.h>
      /
      First step MBS: create an instance /
      ModbusSlave mbs;
      /
      slave registers */
      enum {

      MB_CTRL, /* Led control on, off or blink /
      MB_TIME, /
      blink time in milliseconds /
      MB_CNT, /
      count the number of blinks /
      MB_REGS /
      total number of registers on slave */

      };

      int regs[MB_REGS];
      int ledPin = 13;

      void setup()
      {

      /* the Modbus slave configuration parameters /
      const unsigned char SLAVE = 1;
      const long BAUD = 9600;
      const char PARITY = 'n';
      const char TXENPIN = 1;
      /
      Second step MBS: configure */
      mbs.configure(SLAVE,BAUD,PARITY,TXENPIN);
      pinMode(ledPin, OUTPUT);

      }

      void loop()

      {

      /* Third and las step MBS: update in loop*/

      mbs.update(regs, MB_REGS);

      if(regs[MB_CTRL]==1)

      {

      digitalWrite(ledPin,1);

      }

      else{

      digitalWrite(ledPin,0);

      }

      }**


      But i want a blink effect in led and i modified the script:

      if(regs[MB_CTRL]==1)
      {
      digitalWrite(ledPin,1);
      delay(3000);
      digitalWrite(ledPin,0);
      delay(3000);

      }
      else{
      digitalWrite(ledPin,0);
      }
      }

      Well, when i set the bit 1, the led blink but it don't enter in the else.

      Anyone had the same problem with supervisory and script?

      tank's

      *sorry, my english is very weak.

      posted in Wishlist
      R
      relristein