It seems to be possible to read a parameter of type ADST_STRING only if the underlying linked record has DTYP set to asynInt8ArrayIn/asynInt8ArrayOut, as seen below:
|
case ADST_STRING: |
|
switch(paramInfo->asynType){ |
|
case asynParamInt8Array: |
|
// handled in fireCallbacks() |
|
ret=asynSuccess; |
|
break; |
|
default: |
|
asynPrint(pasynUserSelf, ASYN_TRACE_ERROR, "%s:%s: Type combination not supported. PLC type = %s, ASYN type= %s\n", driverName, functionName,adsTypeToString(paramInfo->plcDataType),asynTypeToString(paramInfo->asynType)); |
|
return asynError; |
|
break; |
|
} |
|
break; |
That way, it is possible to retrieve the string value only explicitly formatting the waveform output value, i.e, caget -S <pvname>.
Instantiating an asynOctetRead fails with:
adsAsynPortDriver:adsUpdateParameter: Type combination not supported. PLC type = ADST_STRING, ASYN type= asynUnknownType
Feature Request: allow usage of asynOctetRead/asynOctetWrite.
Expected behaviour:
When trying something like
record(lsi, "$(P)$(R):MyLongString") {
field(DESC, "my lsi")
field(DTYP, "asynOctetRead")
field(SIZV, "50")
field(SCAN, "I/O Intr")
field(INP, "@asyn($(PORT),0,1)ADSPORT=$(ADSPORT)/MAIN.text1?")
}
#or
record(stringin, "$(P)$(R):MyShortString") {
field(DESC, "my stringin")
field(DTYP, "asynOctetRead")
field(SCAN, "I/O Intr")
field(INP, "@asyn($(PORT),0,1)ADSPORT=$(ADSPORT)/MAIN.text2?")
}
we should be able to get the string values directly without output formatting.
It seems to be possible to read a parameter of type ADST_STRING only if the underlying linked record has DTYP set to asynInt8ArrayIn/asynInt8ArrayOut, as seen below:
twincat-ads/adsApp/src/adsAsynPortDriver.cpp
Lines 4182 to 4193 in 852a4bd
That way, it is possible to retrieve the string value only explicitly formatting the waveform output value, i.e,
caget -S <pvname>.Instantiating an asynOctetRead fails with:
adsAsynPortDriver:adsUpdateParameter: Type combination not supported. PLC type = ADST_STRING, ASYN type= asynUnknownTypeFeature Request: allow usage of asynOctetRead/asynOctetWrite.
Expected behaviour:
When trying something like
we should be able to get the string values directly without output formatting.