|
I have created an mbbo record: I would like to access the string value that the pv is set to some time later, but if I do: Then I get the enum integer value of the record. How can I get the string? |
Answered by
Araneidae
Sep 12, 2022
Replies: 1 comment 1 reply
|
Interesting question. I'm not sure you can, certainly not with Really you're not supposed to want the string, or I guess you need to hang onto the string array when creating the record and do the lookup yourself? Definitely don't think there's a way that avoids using (internal) channel access. |
1 reply
Answer selected by
whs92
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Interesting question. I'm not sure you can, certainly not with
mbbo_record.get(), the internal representation of the value is purely as a number. On the other hand,caget(mbbo_record.name, datatype=str)should work, but it is a rather round the houses way of getting at this value.Really you're not supposed to want the string, or I guess you need to hang onto the string array when creating the record and do the lookup yourself? Definitely don't think there's a way that avoids using (internal) channel access.