REXYGEN Community Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Login

    Solved REXLANG : assigning inputs to an array of doubles

    REXYGEN Studio
    2
    5
    446
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      Apollo
      last edited by

      Is it possible to assign the input signals to an array of doubles?
      I tried several syntaxes buy I end always up with errors.

      My final goal is to convert them to a string and concatenate before sending by means of UDP.

      something like this....

              string temporary ="";
          	for (a=0; a<12; a++){
      	    	strcat(temporary,double2str(signal[a]);
      	    	if (a<11)
      	    	{
      	    		strcat(temporary,',');
      	    	}
      	    
          	Write(long handle, string data)
          	}
              dataCnt = Write(hCom,temporary);
      
      1 Reply Last reply Reply Quote 0
      • cechuratC
        cechurat
        last edited by

        Hi Kris,

        one of the REXLANG limitation is that you can't use input / output arrays (due to internal representation).

        I propose following workaround:
        You can concatenate the doubles outside the REXLANG using String Function Blocks and pass the result String to the REXLANG input.

        Kind Regards,
        Tomas

        A 1 Reply Last reply Reply Quote 0
        • A
          Apollo @cechurat
          last edited by

          @cechurat I was still thinking that the input could not be of the string type.....

          b3923a60-00a9-4373-b570-7f2c710acd4c-image.png

          A cechuratC 2 Replies Last reply Reply Quote 0
          • A
            Apollo @Apollo
            last edited by

            Thanks for the info, it is working now.

            5c817736-cb2d-459a-bec2-a314ba9abb4f-image.png

            1 Reply Last reply Reply Quote 0
            • cechuratC
              cechurat @Apollo
              last edited by

              @apollo said in REXLANG : assigning inputs to an array of doubles:

              @cechurat I was still thinking that the input could not be of the string type.....

              b3923a60-00a9-4373-b570-7f2c710acd4c-image.png

              Thanks for pointing this out! I will update the docs accordingly.

              Cheers,
              Tomas

              1 Reply Last reply Reply Quote 0
              • First post
                Last post

              This is a community forum for REXYGEN users and fans. Detailed information can be found at REXYGEN homepage.

              There is also an outdated REXYGEN community forum.

              Powered by NodeBB.