pcdshub / pytmc

Generate EPICS IOCs and records from TwinCAT projects - along with many TwinCAT project tools
https://pcdshub.github.io/pytmc/
Other
10 stars 11 forks source link

pytmc link settings should be "CP" instead of "CPP" #282

Closed klauer closed 2 years ago

klauer commented 2 years ago

Code: https://github.com/pcdshub/pytmc/blob/bd2529195298e5b1dbfd96772a7702b2199f4f4b/pytmc/record.py#L496

Otherwise, we will be stuck at the 2Hz updates in the record:

If the input link specifies CA, CP, or CPP, regardless of the location of the process variable being referenced, it will be forced to be a Channel Access link. This is helpful for separating process chains that are not tightly related. If the input link specifies CP, it also causes the record containing the input link to process whenever a monitor is posted, no matter what the record’s SCAN field specifies. If the input link specifies CPP, it causes the record to be processed if and only if the record with the CPP link has a SCAN field set to Passive. In other words, CP and CPP cause the record containing the link to be processed with the process variable that they reference changes.

ZLLentz commented 2 years ago

So, CPP doesn't cause the target PV to process in the case where it has some defined schedule, i.e. a scan or some io intr, and this change would make it always process right when we hit the target PV?

klauer commented 2 years ago

I added some background information to the PR text that should hopefully clarify this a bit more. I think you have the right idea, though.

ZLLentz commented 2 years ago

CP - channel access link and process CPP - channel access link and process if passive makes sense