> First, I tested pvget and pvput in linux terminal, then moved to python and Matlab for each step. It works without problem for the NTScalar and NTScalarArray types. But I don't know how to implement for
NTTable type. I will put more information below.
You have found the NTTable helper, which doesn't actually
do that much wrt. the Type definition.
You can also use the NTTable wrapper when setting up the
client Context. Which may or may not be helpful in your
application.
> ctxt = p4p.client.thread.Context(nt={"epics:nt/NTTable:1.0": p4p.nt.NTTable})
With this, ctx.get() will implicitly call NTTable.unwrap()
...
> */In the Python command line, work fine; but pvget doesn't show a whole table./*
...
>>>> from p4p.client.thread import Context
>>>> MatP4P = Context('pva')
>>>> MatP4P.get('TEST:TBL')
> Value(id:epics:nt/NTTable:1.0, Value(['device_1', 'device_2'])) # <== P4P doesn't show whole information such as in linux terminal
To avoid excessive console output, the repr() implementation for Value does not recurse.
You might investigate Value.tolist(), .todict(), or .tostr()
...
> */In Matlab command line, pvput shows error message. Due to the colon operator.
...
>>> MatP4P.put('TEST:TBL', {'value.name': ['test1', 'test2'], 'value.number': [10, 20]})
> Warning: Colon operands must be real scalars.
>
> Error using :
> For colon operator with char operands, first and last operands must be char.
This looks like a matlab syntax error. Maybe this link is relevant?
I am studying a few web pages including the one you provided. There might be some way to send complex arguments from MATLAB to Python. I will update you later.
Thank you for your help.
Best regards,
Kuktae