frib-high-level-controls / save-set-restore

save set restore
MIT License
2 stars 0 forks source link

live setpoint does not work #16

Open shengb opened 8 years ago

shengb commented 8 years ago

Actually, this might be from the conceptual difference. MASAR trades all pvs same, do not has logic of set point PV or read back PV. 2 issues:

  1. The "Live Setpoint" does not get the real value from IOC although the IOC is running.
  2. Since the saved value is called "Stored Value", another column should be "Live Value" instead of "Live Setpoint".
jbobnar commented 8 years ago

In ideal world there exist a service, which provides a readback PV for "every" setpoint PV. The idea is that (some day) this will be channel finder. However, populating the channel finder with this info today is not feasible, therefore a decision was made to fallback to storing the readback pvs (and threshold values) into the set file. There is still an extension point, through which you will be able to provide the readback names obtained the channel finder, when implemented. In such case it is irrelevant whether one is working with masar service, git or any other data provider.

  1. Please, explain under what condition this happens. However, you should note that CSS connects to PVs directly, while python masar client queries the service for the live values. If your IOC is behind a firewall, that might be the cause of the problem.
  2. I wanted to make a clear separation between Live Readback and Live Setpoint. If 'Live Value' is generally preferred, I can of course change that.
berryma4 commented 8 years ago

I prefer the file at this time (not channelfinder), not only because of the above, but we would need to see the benefits to the extra complexity and dependency. And, In the end I see channelfinder, or other service, populating the file. So, the file would still exist. This is because it is a "snapshot", and we shouldn't rely on mutable data for a record.

I prefer Live Readback and Live Setpoint, as this is what was preferred from our meetings (including A1900, ReA, and ECR representatives).

shengb commented 8 years ago

Here we are talking about 2 different topics:

  1. Shall we always pair setpoint & readback? It is a general topic, and always has different opinions.
  2. PV connections.

Let's focus on the issues 2 first. I was trying it on my Mac laptop. Everything (MASAR service, testing IOC, and CS-Studio) runs on the same machine. I am able to do a caget from terminal, and firewall is off. But the Live value is empty.

It is OK on a linux machine.

berryma4 commented 8 years ago

Careful, cs-studio/diirt holds their own settings for epics in /etc/cs-studio/diirt (not the same as commandline caget). Our default for EPICS_CA_ADDR_LIST is to go through the gateway. You may need to add localhost, if you are doing localhost work.

On Wed, Feb 17, 2016 at 9:17 AM, Guobao Shen notifications@github.com wrote:

Here we are talking about 2 different topics:

  1. Shall we always pair setpoint & readback? It is a general topic, and always has different opinions.
  2. PV connections.

Let's focus on the issues 2 first. I was trying it on my Mac laptop. Everything (MASAR service, testing IOC, and CS-Studio) runs on the same machine. I am able to do a caget from terminal, and firewall is off. But the Live value is empty.

It is OK on a linux machine.

— Reply to this email directly or view it on GitHub https://github.com/frib-high-level-controls/save-set-restore/issues/16#issuecomment-185224077 .

shengb commented 8 years ago

Thanks for letting me know about the way to change the diirt. I did not change anything. I am using your distribution on both Mac and Linux. My linux is even a virtual machine on my Mac.

The linux dist CS-S works, but not the Mac one.

berryma4 commented 8 years ago

you are probably need to configure the diirt dirtory on the mac.

On Wed, Feb 17, 2016 at 9:47 AM, Guobao Shen notifications@github.com wrote:

Thanks for letting me know about the way to change the diirt. I did not change anything. I am using your distribution on both Mac and Linux. My linux is even a virtual machine on my Mac.

The linux dist CS-S works, but not the Mac one.

— Reply to this email directly or view it on GitHub https://github.com/frib-high-level-controls/save-set-restore/issues/16#issuecomment-185236055 .

shengb commented 8 years ago

Where is the diirt directory? Any instruction?

berryma4 commented 8 years ago

in cs-studio/configuration/diirt

On Wed, Feb 17, 2016 at 9:53 AM, Guobao Shen notifications@github.com wrote:

Where is the diirt directory? Any instruction?

— Reply to this email directly or view it on GitHub https://github.com/frib-high-level-controls/save-set-restore/issues/16#issuecomment-185238246 .

shengb commented 8 years ago

I found one: cs-studio/configuration/diirt/datasources there is no setting for EPICS_CA_ADDR_LIST on either Mac or Linux

berryma4 commented 8 years ago

mac: cs-studio/configuration/diirt/datasources/ca

the linux debian package: uses the one in /etc/cs-studio/diirt.

On Wed, Feb 17, 2016 at 9:59 AM, Guobao Shen notifications@github.com wrote:

I found one: cs-studio/configuration/diirt/datasources there is no setting for EPICS_CA_ADDR_LIST on either Mac or Linux

— Reply to this email directly or view it on GitHub https://github.com/frib-high-level-controls/save-set-restore/issues/16#issuecomment-185241544 .

shengb commented 8 years ago

OK, the ca directory does not exist on Mac. I copied it, and it now works.

@jbobnar back to our original topic: Why the stored value is in red as shown in the picture?

screen shot 2016-02-17 at 10 22 32 am
shengb commented 8 years ago

@jbobnar If the column named "Stored Value", why not "Live Setpoint" => "Live Value" as shown in above?

berryma4 commented 8 years ago

I believe this is to distinguish between sets and reads

On Wed, Feb 17, 2016 at 10:30 AM, Guobao Shen notifications@github.com wrote:

@jbobnar https://github.com/jbobnar If the column named "Stored Value", why not "Live Setpoint" => "Live Value" as shown in above?

— Reply to this email directly or view it on GitHub https://github.com/frib-high-level-controls/save-set-restore/issues/16#issuecomment-185255532 .

shengb commented 8 years ago

from the UI itself, how can I tell the pv listed in the 2nd column is a set point or a read back?

jbobnar commented 8 years ago

@shengb What you see in your screenshot has already been fixed in the version that I pushed yesterday. There was an error in the value comparison routines.

from the UI itself, how can I tell the pv listed in the 2nd column is a set point or a read back?

That is a setpoint by definition. Whether that is an actual device setpoint or readback is beyond the knowledge of the application. The users creating the sets should pay attention to what names are used in the set file.

Since I am not the primary user of the application, I can only suggest how to name the columns. In the screenshot below I attached my proposal for all column names. Note that these are full blown tables showing all possible columns (all readback stuff can be turned on or off). The top table is for a single snapshot, the bottom one is for snapshots comparison.

Let me know how to name each column and I will update it accordingly.

screenshot1

shengb commented 8 years ago

There would be a long discussion to have set point and read back, and pair. To simplify the problem, I would say the PV is a "Live Value" if the readback is not defined.

berryma4 commented 8 years ago

Maybe we should ask the users and get back to Jaka?

shengb commented 8 years ago

If there are 2 columns (readback & setpoint) like showed above, it makes sense to have a column to show live setpoint, and live readback. If there is only one PV column, I would like to name it live value since "live setpoint" is very confusing in this case.

berryma4 commented 8 years ago

Changing the name may be confusing. We should aim to keep things as consistent as possible.

On Mon, Feb 22, 2016 at 8:19 AM, Guobao Shen notifications@github.com wrote:

If there are 2 columns (readback & setpoint) like showed above, it makes sense to have a column to show live setpoint, and live readback. If there is only one PV column, I would like to name it live value since "live setpoint" is very confusing in this case.

— Reply to this email directly or view it on GitHub https://github.com/frib-high-level-controls/save-set-restore/issues/16#issuecomment-187169004 .

shengb commented 8 years ago

Agree. But how to handle it is there is only one read back PV available, for example, I want to have a save set for all our BPM X/Y positions. I want to know the live value, should I still call it live set point?

berryma4 commented 8 years ago

Can we move it to the other column? This would seem logical, although I don't know if possible.

On Mon, Feb 22, 2016 at 8:55 AM, Guobao Shen notifications@github.com wrote:

Agree. But how to handle it is there is only one read back PV available, for example, I want to have a save set for all our BPM X/Y positions. I want to know the live value, should I still call it live set point?

— Reply to this email directly or view it on GitHub https://github.com/frib-high-level-controls/save-set-restore/issues/16#issuecomment-187185537 .

shengb commented 8 years ago

have it in other column is fine. 1) If there is only one PV column available, show one column; 2)if there are more than one PV available, show column pairs is good.

But I do not want to show them both 1) & 2) simultaneously.

jbobnar commented 8 years ago

@berryma4 That is not possible, because it would require the application to know if a particular PV is a readback or not.

However, even if the application could get that information somehow, one would end up with a table, which would look very similar to the table that you see now (when you turn off all readback stuff). The only difference would be in the headers which would say Readback instead of Setpoint. Eventually that is almost identical to Guobao's suggestion of renaming the header.

shengb commented 8 years ago

Any progress here?