• 0 Votes
    2 Posts
    943 Views
    cechuratC

    Hi George,

    Thanks for your question. You need to create a kind of state machine which basically does the following (one line = one task period):

    Write() - send a read request to the device Read() - save received data and length into a global buffer/variable and distinguish if the received message is complete Retry and repeat Read() if the previously received message was not complete

    You will need to introduce a timeout - it can happen that you lost some data so there should be some timeout when you say "Message incomplete, resend the read request".

    Cheers,
    Tomas

  • How to create substring

    REXYGEN Studio
    8
    0 Votes
    8 Posts
    2k Views
    jaroslav_sobotaJ

    Please start a new topic for questions not directly related to the original question.

    There is no such block, you must combine the existing blocks to achieve this.

    Jaroslav

  • REXLANG include file

    Moved REXYGEN Studio
    4
    0 Votes
    4 Posts
    2k Views
    R

    @relaxc Hello,

    C code has certain limitations in the REXLANG block. A detailed description of the block is available here: https://www.rexygen.com/doc/ENGLISH/MANUALS/BRef/REXLANG.html#x274-27300015. Examples for using the REXLANG block are available in the installation. By default on the C:\Program Files\REX Controls\REXYGEN 2.50.10.13491\Examples\0203_Function_Blocks_REXLANG path. Compilation takes place only when translating the whole project in Rexygen Studio. Unfortunately, .so or .dll files are not supported in REXLANG . In REXYGEN, it is possible to call standard C language scripts with linked .so or .dll files. Scripts can be executed using the EPC block (documentation here). If you can use Python instead of C, take a look at the Python block (documentation here).

    Cheers,
    Jan