DiamondLightSource / pmac

Driver for the Delta Tau PMAC motion controller family.
Apache License 2.0
25 stars 17 forks source link

Global variables as PVs #80

Closed georgekontogiorgos closed 5 years ago

georgekontogiorgos commented 5 years ago

Hello!

I would like to know if there is a way to read global variables on IOC level, as it does with M-variables on GPIO or Plc[i].Running. If there is any feature to read P-variables I guess that it could be possible.

On my project I will use the PV SendCmd to read custom variables but I would like to know if there is a fashionable form to do it.

Thanks George

gilesknap commented 5 years ago

Hi George,

Take a look at the template pmacApp/Db/pmacVariableRead.template

I think that will have what you need.

georgekontogiorgos commented 5 years ago

Hi George,

Take a look at the template pmacApp/Db/pmacVariableRead.template

I think that will have what you need.

Hi Giles!

Yes, it is exactly what I was searching for. But instead using pmacApp/Db/pmacVariableRead.template I used pmacApp/Db/pmacVariableWrite.template. I do not know why but the template you sent me throwed this error during IOC startup:

PV: MNC:EmergencyError:RBV scanAdd: I/O Intr not valid (no get_ioint_info)

Furthermore, caget and caput could not catch the correct global variable. So I tried pmacVariableWrite.template and it worked fine for me, besides it, this template already have RBV and SET "fields".

Thanks a lot for replying and for helping me.