Hi:
When I try your example with a plain record, bo device support, it works OK:
record(ao, "MaskSet")
{
field(DOL, 255)
field(LOPR, 0x00000000)
field(HOPR, 0x7FFFFFFF)
field(PINI, "YES")
}
Enter 0xFFFFFF7 -> I get 0xFFFFFF7
Enter 0xFFFFFF0 -> I get 0xFFFFFF0
Enter 0x800007F -> I get 0x800007F
Enter 0x8000080 -> I get 0x8000080
Enter FFFFFFFF (no leading '0x') -> I get 0xFFFFFFFF
0 -> 0x0
-1 -> 0xFFFFFFFF
-7 -> 0xFFFFFFF9
==> Could your number clamping be caused by the asyn device support that you're using?
-Kay
________________________________________
From: [email protected] <[email protected]> on behalf of Pilar Gil Jaldo <[email protected]>
Sent: Tuesday, November 14, 2017 5:17 AM
To: [email protected]
Subject: Problem when formating a field as HEX32
Dear all,
I am having following problem.
MaskSet is a 32 double variable:
record(ao, "$(user):MaskSet")
{
field(DTYP ,"asynInt32")
field(OUT ,"@asyn($(PORT),$(ADDR),$(TIMEOUT))mask")
field(LOPR, 0x00000000)
field(HOPR, 0x7FFFFFFF)
field(PINI, "YES")
}
For the CSS/BOY, I have defined a text input field which makes possible
to change the value of this field.
When I set "Default" as format type of the field, everything works fine.
The problem comes when changing the format type to "HEX32". In this
case, it is not possible to control the introduced value to the set field.
For example,
if we introduce 0xFFFFFF7, after pressing Enter, the value changes
automatically to 0xFFFFFF0.
Or when 0x800007F -> the input value changes to 0x8000080.
If now, I change the format type to "Default" again and introduce the
value 134217855 ( 0x800007F as decimal) every works as it should.
Have somebody an idea of what is happening?
Kind regards,
Pilar Gil