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

    Topics created by Scoobsalamander

    • S

      Initialization of string in REXLANG

      REXYGEN Studio
      • • • Scoobsalamander
      4
      0
      Votes
      4
      Posts
      833
      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

      REXYGEN Studio
      • • • Scoobsalamander
      5
      0
      Votes
      5
      Posts
      570
      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?

      REXYGEN Studio
      • • • Scoobsalamander
      6
      0
      Votes
      6
      Posts
      633
      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

      REXYGEN Studio
      • • • Scoobsalamander
      3
      0
      Votes
      3
      Posts
      308
      Views

      S

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

    • S

      picture as background

      REXYGEN HMI Designer
      • • • Scoobsalamander
      3
      0
      Votes
      3
      Posts
      334
      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

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

      REXYGEN Studio
      • • • Scoobsalamander
      7
      0
      Votes
      7
      Posts
      601
      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

      REXYGEN Studio
      • • • Scoobsalamander
      6
      0
      Votes
      6
      Posts
      530
      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

      REXYGEN Studio
      • • • Scoobsalamander
      4
      0
      Votes
      4
      Posts
      852
      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?

      Bug reports, Feature requests
      • • • Scoobsalamander
      2
      0
      Votes
      2
      Posts
      648
      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?

      Communication (RS232, RS485, I2C, SPI, UDP, TCP, ...)
      • • • Scoobsalamander
      13
      0
      Votes
      13
      Posts
      3.3k
      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

      Modbus TCP
      • • • Scoobsalamander
      4
      0
      Votes
      4
      Posts
      1.9k
      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