REXYGEN Community Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Login
    1. Home
    2. Scoobsalamander
    S
    • Profile
    • Following 0
    • Followers 0
    • Topics 12
    • Posts 37
    • Best 1
    • Controversial 0
    • Groups 0

    Scoobsalamander

    @Scoobsalamander

    1
    Reputation
    212
    Profile views
    37
    Posts
    0
    Followers
    0
    Following
    Joined Last Online
    Location Hulshout (Belgium) Age 50

    Scoobsalamander Unfollow Follow

    Best posts made by Scoobsalamander

    • RE: REXYGEN 3.0.0 is available

      Hi Tomáš, these are just some 'Chinese' IO modules which do work just fine with Codesys running on a Raspberry Pi 4. However it would be nice that I would be able to use them with Rexygen as I feel more comfortable programming in Rexygen Studio and I like the way an HMI can be created inside Inkscape.
      If you could provide me a basic example then I can give it a try.

      Attached are two xml files.

      Ethercat_xml.zip

      EV3200D = 32 digital Inputs
      EtherCATBusIO = 16 DI / 16 DO / 2AO / 2AI / 2 PWMout / 1 encoder input / 2 counter input / 1 Modbus RTU

      posted in Development tools
      S
      Scoobsalamander

    Latest posts made by Scoobsalamander

    • RE: REXYGEN 3.0.0 is available

      @Jan-Reitinger Hi Ja, thank you very much, I'll give it a try one of these days. When I have some results I'll post the outcome here.

      posted in Development tools
      S
      Scoobsalamander
    • RE: REXYGEN 3.0.0 is available

      Hi Tomáš, these are just some 'Chinese' IO modules which do work just fine with Codesys running on a Raspberry Pi 4. However it would be nice that I would be able to use them with Rexygen as I feel more comfortable programming in Rexygen Studio and I like the way an HMI can be created inside Inkscape.
      If you could provide me a basic example then I can give it a try.

      Attached are two xml files.

      Ethercat_xml.zip

      EV3200D = 32 digital Inputs
      EtherCATBusIO = 16 DI / 16 DO / 2AO / 2AI / 2 PWMout / 1 encoder input / 2 counter input / 1 Modbus RTU

      posted in Development tools
      S
      Scoobsalamander
    • RE: REXYGEN 3.0.0 is available

      In the release notes "REXYGEN 3.0.0-beta" there is mentioned that EtherCAT Communication Driver's
      Jitter and latency are reduced with the added support for XPD on Linux.

      Does this mean we can use EtherCAT now? I am asking because I have a huge interest in using my RasPi with Rexygen in combination with two IO-EtherCAT modules.

      posted in Development tools
      S
      Scoobsalamander
    • RE: Initialization of string in REXLANG

      @reitinge I did try this before but then I can't even compile due to an error.

      23345552-af28-4c1c-b9d1-6a4c22f5c625-image.png

      But apparently it was because I did the initialization of this string inside the main routine.
      Bizarre that it is throwing a warning for the string 'stringTemp' and not for the long variable 'index'.
      Both are only used inside the main routine.

      This is the complete code which is now running without a warning :

      //assigning inputs to variables, these variables are READ-ONLY
      double input(0) inputGLAS; 
      double input(1) inputGFT; 
      double input(2) inputPMD;
      double input(3) inputRA;
      double input(4) inputTEXT;
      double input(5) inputP_K;
      
      
      
      //assigning variables to outputs, these variables are WRITE-ONLY
      string output(0) stringOUT; //value to send to y0 output
      char stringTemp[80];
      
      
      
      //the init procedure is executed once when the REXLANG function block initializes
      long init(void)
      {
      	
      	return 0;
      }
      
      //the main procedure is executed repeatedly (once in each sampling period)
      long main(void)
      {
      	
      	
      	long index = 0;
      	
      	//char stringTemp[80];
              stringTemp="";
      
      	strcat(stringTemp,"Vergeet+niet+volgend+vuilnis+buiten+te+zetten+:+");
      	
      	if (inputGLAS!=0)
      	{
      		strcat(stringTemp,"Glas");
      		index=index+1;
      	}
      	
      	if (inputGFT!=0)
      	{
      		if (index!=0)
      		{
      			strcat(stringTemp,",+");
      		}
      		strcat(stringTemp,"GFT");
      		index=index+1;
      	}
      	
      	if (inputPMD!=0)
      	{
      		if (index!=0)
      		{
      			strcat(stringTemp,",+");
      		}
      		strcat(stringTemp,"PMD");
      		index=index+1;
      	}
      	
      	if (inputRA!=0)
      	{
      		if (index!=0)
      		{
      			strcat(stringTemp,",+");
      		}
      		strcat(stringTemp,"Restafval");
      		index=index+1;
      	}
      	
      	if (inputTEXT!=0)
      	{
      		if (index!=0)
      		{
      			strcat(stringTemp,",+");
      		}
      		strcat(stringTemp,"Textiel");
      		index=index+1;
      	}
      	
      	if (inputP_K!=0)
      	{
      		if (index!=0)
      		{
      			strcat(stringTemp,",+");
      		}
      		strcat(stringTemp,"Papier+en+Karton");
      	}
      	
      
      	stringOUT=stringTemp;
      	return 0;
      }
      
      //the exit procedure is executed once when the task is correctly terminated
      // (system shutdown, downloading new control algorithm, etc.)
      long exit(void)
      {
      	/* PUT YOUR CODE HERE */
      	return 0;
      }
      
      posted in REXYGEN Studio
      S
      Scoobsalamander
    • Initialization of string in REXLANG

      I got this warning in the Compiler Window but everything is working fine :

      "Warning compiling file 'WasteSrcfile.c' (line 30): variable 'stringTemp' is used without initialization"
      

      The initialization was one like this :

      char stringTemp[80];
      

      Something like this, to initialize an empty string will not work :

      char stringTemp[80] = "";
      
      posted in REXYGEN Studio
      S
      Scoobsalamander
    • RE: SHIFTOCT - persistent parameters

      @cechurat No problem, workarounds are possible and and it's good to have some extra challenges. 🙂

      But if the checkbox for 'persistent parameters' is there then I assume it is an existing feature.

      posted in REXYGEN Studio
      S
      Scoobsalamander
    • SHIFTOCT - persistent parameters

      I am using the SHIFTOCT function block to store every 24hr the counter of my energy meter to get some history of the last 7 days.
      But even with the persistent parameters box checked I lose all data after rebooting and/or downloading a new configuration.

      posted in REXYGEN Studio
      S
      Scoobsalamander
    • RE: AVG - Moving average - number of samples?

      @cechurat ... this would mean that if I add a task in the future the timing might not be correct anymore.
      Would it not be better that this can be configured with timing (e.g. seconds, minutes, days,.....) instead of a certain amount of samples?

      posted in REXYGEN Studio
      S
      Scoobsalamander
    • RE: AVG - Moving average - number of samples?

      @cechurat
      So, thus this mean that with the below settings I need 1800 samples for a 15min running average, correct? (50msx10 --> every 0,5s a sample)

      6b7cc2a0-3907-485d-9b53-94daae05be31-image.png

      posted in REXYGEN Studio
      S
      Scoobsalamander
    • RE: Json string parsing problem

      @cechurat
      No problem, Node-Red is always good for a (temporary) work around.

      posted in REXYGEN Studio
      S
      Scoobsalamander