W.M. Programming in Mosaic Dec 19, 2022, 10:02 AM Dec 20, 2022, 7:52 AM

Dear Support,
I have a token variable with a max size of 2048, I am trying to declare it in the foxtrot 2 plc and set its value through TECO API.

is it applicable? if not, what other options could use for that?

Answers 2

M.B. Dec 19, 2022, 4:56 PM

TecoApi supports array of size up to 256 members in one query, so array of 2048 bytes is no possible. One of possibilites can be to divide token to multiple STRING[255] and put them in the array (If token is binary, it's necessary to transform it first to base64 encoding, before putting it in STRING variables). There may be other solutions, but we would need to know more about the application. What is the device that should be reading this token from PLC?

W.M. Dec 20, 2022, 7:52 AM

Actually, the application is as follows:
AWS should set this token and save it in cp-2000, many ways to do this TCP/UDP connection or TECO API (I am trying both), and then cp-2000 will send an HTTPS request to the LWA OAuth server to refresh this token, and send some other change reports. 

I will try your advice by dividing the token and setting it to many TECO API variables 

Your answer

You have to be signed-in for asking a question. Continue after sign-in.