Thanks.
I will provide detailed tests.
#define COMB_MAX_NUM 260
#define MATRIX_MAX_SIZE 10
_SYSTEM_MATRIX SysMatrixRun= {};
Let's understand the two symbols: SysMatrixRun.vhs[5] and SysMatrixRun.pp_R[0][1][1]
The first
I use this method TSA
FMSTR_TSA_TABLE_BEGIN(first_table)
FMSTR_TSA_RW_VAR(SysMatrixRun, FMSTR_TSA_USERTYPE(_SYSTEM_MATRIX))
FMSTR_TSA_STRUCT(_SYSTEM_MATRIX)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_R, FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_LC, FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, YL, FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, YC, FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, YR, FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, attr, FMSTR_TSA_UINT8)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, vhs, FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, J, FMSTR_TSA_FLOAT)
FMSTR_TSA_TABLE_END( )
FMSTR_TSA_TABLE_LIST_BEGIN( )
FMSTR_TSA_TABLE(first_table)
FMSTR_TSA_TABLE_LIST_END( )
I can load TSA in MASTER or lite. Then I conducted a test using Python.
This will obtain TSA.
data = await SendRequest(ws, 'ReadTSA')
global count
count = int(data['count'])
print('Parsed TSA contained %d symbols.' % count)
global variable
for i in range(count):
data = await SendRequest(ws, 'EnumSymbols', i)
print(data)
Then, this will successfully read the actual value.. For example, >> 41.23
variable = {
'name': 'SysMatrixRun.vhs[5]',
'addr': 'SysMatrixRun.vhs[5]',
'type': 'float',
'size': 4
}
await SendRequest(ws, 'DefineVariable', variable)
data = await SendRequest(ws, 'ReadVariable', variable['name'])
print(data)
But then,this will unsuccessfully read the actual value. Error message is roughly "Symbol not exist"
variable = {
'name': "SysMatrixRun.pp_R[0][1][1]",
'addr': "SysMatrixRun.pp_R[0][1][1]",
'type': 'float',
'size': 4
}
await SendRequest(ws, 'DefineVariable', variable)
data = await SendRequest(ws, 'ReadVariable', variable['name'])
print(data)
In this case, even when using TSA, the variable "SysMatrixRun.pp_R[0][1][1]" cannot be read in the MASTER.
But after I changed to use this TSA, I was able to read "SysMatrixRun.pp_R[0][1][1]" in the MASTER.
FMSTR_TSA_STRUCT(_SYSTEM_MATRIX)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_R[0][0], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_R[0][1], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_R[0][2], FMSTR_TSA_FLOAT)
...
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_R[59][7], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_R[59][8], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_R[59][9], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_LC[0], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_LC[1], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_LC[2], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_LC[3], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_LC[4], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_LC[5], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_LC[6], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_LC[7], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_LC[8], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, pp_LC[9], FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, YL, FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, YC, FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, YR, FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, attr, FMSTR_TSA_UINT8)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, vhs, FMSTR_TSA_FLOAT)
FMSTR_TSA_MEMBER(_SYSTEM_MATRIX, J, FMSTR_TSA_FLOAT)
FMSTR_TSA_TABLE_END( )
FMSTR_TSA_TABLE_LIST_BEGIN( )
FMSTR_TSA_TABLE(first_table)
FMSTR_TSA_TABLE_LIST_END( )
I wonder if it's because the "lite" version is unable to interpret the writing style of multi-dimensional arrays like "[][]"?
If you need more test information, I will provide "the second"