Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mbboDirect with asyn:READBACK is not processed #207

Closed
exzombie opened this issue Jun 10, 2024 · 3 comments · Fixed by #208
Closed

mbboDirect with asyn:READBACK is not processed #207

exzombie opened this issue Jun 10, 2024 · 3 comments · Fixed by #208

Comments

@exzombie
Copy link
Contributor

With the database below, combined with a driver that periodically calls setUIntDigitalParam() and callParamCallbacks() for the RANDOM reason, the first record is processed, while the second is not. If it's relevant, I tried setting both valueMask and interruptMask parameters to setUIntDigitalParam() to 0xffff.

record(longout, "$(user):random1") {
    field(DTYP, "asynUInt32Digital")
    field(OUT, "@asynMask($(port),0,0xffff) RANDOM")
    info(asyn:READBACK, 1)
}

record(mbboDirect, "$(user):random2") {
    field(DTYP, "asynUInt32Digital")
    field(OUT, "@asynMask($(port),0,0xffff) RANDOM")
    info(asyn:READBACK, 1)
}
@exzombie
Copy link
Contributor Author

Correction, the record $(user):random2 is processed, but VAL remains unchanged. The change ends up in RVAL and is not propagated to VAL and B0-B1F.

@MarkRivers
Copy link
Member

It appears that the same block of code that sets RVAL also then sets VAL.

pr->rval = rval;

Can you add some debugging there to see why VAL is not changing?

@exzombie
Copy link
Contributor Author

What happens there is that RVAL is set from the callback result, then VAL is set, bit by bit, based on values of B1-B1F. RVAL is not considered, and bits are zero, so VAL stays at zero. Given that this piece of code is intended specifically for handling callbacks, that should be turned around, no? VAL should be set from RVAL (after a shift), and B1-B1F should be set from VAL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants