I forgot to CC tech-talk on my initial reply, so this message contains some discussion that is not previously on tech-talk.
Ø
I assume mbboDirect requires consecutive bit addressing and there is no workaround to assign custom bit maps?
That is correct, mmboDirect does require consecutive bit addressing.
Mark
From: Pontius Pontiac <[email protected]>
Sent: Wednesday, August 14, 2019 6:11 PM
To: Mark Rivers <[email protected]>
Subject: Re: mbboDirect record setup
Hi Mark,
Should I reply to the list? I couldn't find an obvious way to continue the thread, hence this reply directly to you. I'm new to tech-talk so if there is a convention to follow, please let me know.
Thank you for the quick turnaround on this - I did not understand the function of the mask instruction and so was not using it properly. Implementing your suggested fix worked straight away. To answer your question about the VAL field coming from another record
- the MEDM slider is in fact linked to a soft record, which is FLNK-ed to the mbboDirect record. We require the bits to be changed synchronously, so a LATCH bit is used to control the propagation of the mbboDirect output to the device under control.
An additional complication I came across is that the PLC we use, made by the company Acromag, groups output registers into 16-bit registers, of which only 4 bits correspond to outputs (the 12 MSBs are unused). Consequently, if I want to
control 6 mbboDirect bits, I found that I have to break this up into 4+2 bits. I assume mbboDirect requires consecutive bit addressing and there is no workaround to assign custom bit maps?
Anyways I think the current situation is workable for us, thank you again for your prompt help!
Hi,
I am not sure I understand why you are using an mbboDirect record, rather than a longout? My understanding is that with the mbboDirect record one writes to the individual bit fields (B0, B1, ..BF). However, you have configured the record to get its VAL field
directly from another record
field(OMSL,"closed_loop")
field(DOL,"C1:LSC-CM_REFL1_SET")
Are you also writing directly to the individual bit fields?
Also, you have specified a mask of a single bit in your OUT field:
field(OUT,"@asynMask(C1ISCAUX_BIO02 0 0x1)")
0x1 is the mask. If you want to access the least significant 6 bits then I think you should use 0x3f.
Mark
________________________________
From: [email protected] <[email protected]> on behalf of Pontius Pontiac via Tech-talk <[email protected]>
Sent: Tuesday, August 13, 2019 6:45 PM
To: [email protected]
Subject: mbboDirect record setup
Hi,
While setting up an mbboDirect record with an Acromag XT1111 Binary I/O module, I observe the behavior that only the LSB of my 6-bit mbboDirect bit bank is being changed when the EPICS value is changed. Is modbus function "6" the appropriate one to use for
the mbboDirect data type? The drvModbusAsynConfigure instruction I am using is:
drvModbusAsynConfigure("C1ISCAUX_BIO02","c1iscaux_bio02",0,6,0,4,0,1,"Acromag")
and the EPICS record itself is set up as:
grecord(mbboDirect,"C1:LSC-CM_REFL1_BITS")
{
field(DESC,"REFL1 gain bits")
field(DTYP,"asynUInt32Digital")
field(OUT,"@asynMask(C1ISCAUX_BIO02 0 0x1)")
field(NOBT,"6")
field(OMSL,"closed_loop")
field(DOL,"C1:LSC-CM_REFL1_SET")
field(PINI,"YES")
}
I'm also wondering if it is possible to have mbboDirect bits that are grouped together from two separate hardware Binary I/O PLCs?
thanks,
gautam
|