Solved REXLANG : assigning inputs to an array of doubles
-
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);
-
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 -
@cechurat I was still thinking that the input could not be of the string type.....
-
Thanks for the info, it is working now.
-
@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.....
Thanks for pointing this out! I will update the docs accordingly.
Cheers,
Tomas