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

    Topics

    • S

      Initialization of string in REXLANG

      Watching Ignoring Scheduled Pinned Locked Moved REXYGEN Studio
      4
      0 Votes
      4 Posts
      2k Views
      S

      @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; }
    • S

      SHIFTOCT - persistent parameters

      Watching Ignoring Scheduled Pinned Locked Moved REXYGEN Studio
      5
      0 Votes
      5 Posts
      2k Views
      cechuratC

      @scoobsalamander I understand, however "Persistent parameters" feature is mainly for parameters and in some cases internal states of FBs, not inputs/outputs - see Doc: https://www.rexygen.com/doc/ENGLISH/MANUALS/RexygenStudio/RexygenStudio_ENG.html#x1-220002.5

      Cheers,
      Tomas

    • S

      AVG - Moving average - number of samples?

      Watching Ignoring Scheduled Pinned Locked Moved REXYGEN Studio
      6
      0 Votes
      6 Posts
      2k Views
      S

      @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?

    • S

      Json string parsing problem

      Watching Ignoring Scheduled Pinned Locked Moved REXYGEN Studio
      3
      0 Votes
      3 Posts
      919 Views
      S

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

    • S

      picture as background

      Watching Ignoring Scheduled Pinned Locked Moved REXYGEN HMI Designer
      3
      0 Votes
      3 Posts
      983 Views
      S

      @ondrej_severa Thanks, solution 1 is working fine. With solution 2 I have problems with the permission to write to this location.

    • S

      Licence problem : 'Required platform doesn't exist'.

      Watching Ignoring Scheduled Pinned Locked Moved Unsolved REXYGEN Studio
      7
      0 Votes
      7 Posts
      2k Views
      R

      We added corresponding models to our detection algorithm. It will be included in the next version 2.50.11. Thank you for the report.

    • S

      TCP socket : parsing NMEA string

      Watching Ignoring Scheduled Pinned Locked Moved REXYGEN Studio
      6
      0 Votes
      6 Posts
      2k Views
      S

      Thanks for the info .... I'll give it a try one of these days. I'll post the solution... at least if I am able to solve it..... 🙂

    • S

      MVD block for 3-way valve actuator

      Watching Ignoring Scheduled Pinned Locked Moved REXYGEN Studio
      4
      0 Votes
      4 Posts
      2k Views
      jaroslav_sobotaJ

      Hi Kris,
      you are right, it is necessary to force the valve to fully closed position once in a while. The SRTF function block is not the best one for your needs. I'd go for the ATMT state machine or simply use an ISSW switch to send logic 1 to the DN (CLOSE) input.

      Jaroslav

    • S

      SFCE editor, how to use?

      Watching Ignoring Scheduled Pinned Locked Moved Bug reports, Feature requests
      2
      0 Votes
      2 Posts
      1k Views
      jaroslav_sobotaJ

      Hi Kris,
      the SFCE editor should be in English by default. If this is not the case, you can switch it to English in the bottom part of the window:
      0_1575363932278_sfc-editor-language.png

      As for the manual, it is only in Czech at the moment: https://www.rexygen.com/doc/PDF/CZECH/SFCEditor_CZ.pdf
      Copy-pasting the contents into Google translate might help.

      In general, this tool generates the STT transition table and touts array for the ATMT or EATMT function blocks.

      Hope this helps at least a bit.

      Kind regards
      Jaroslav

    • S

      Ethercat compatible?

      Watching Ignoring Scheduled Pinned Locked Moved Communication (RS232, RS485, I2C, SPI, UDP, TCP, ...)
      13
      0 Votes
      13 Posts
      6k Views
      S

      No problem, it is only for some hobby-related stuff so no rush.

      Grtz,

      Kris

    • S

      Writing once a single value to a register

      Watching Ignoring Scheduled Pinned Locked Moved Modbus TCP
      4
      0 Votes
      4 Posts
      3k Views
      cechuratC

      Hi Scoobsalamander,

      glad I could help. You are right, I didn't take to count the timing. Good luck with your project!

      Cheers, Tomas