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

Usage of variables HMI_* in OpenPLC #10

Open
Thus0 opened this issue Aug 24, 2021 · 1 comment
Open

Usage of variables HMI_* in OpenPLC #10

Thus0 opened this issue Aug 24, 2021 · 1 comment

Comments

@Thus0
Copy link
Contributor

Thus0 commented Aug 24, 2021

Hi,

first of all, thanks for the great work ! I've managed to run GRFICSv2 with docker containers and I've used OpenPLCv3 instead of OpenPLCv2 as the web interface is nicer. The chemical plan seems to work : I can see the values on ScadaBR which match what I see on the Simulation. I can also change directly OpenPLC holding registers with modbus command to change the pressure_sp.

I have a question : what's the purpose of the variables hmi_* registers at %MWxx as ScadaBR seems to read %IWxx variables ?

https://github.com/Fortiphyd/GRFICSv2/blob/master/workstation_vm/simplified_te.st#L377

  hmi_pressure AT %MW20 : INT;
   hmi_level AT %MW21 : INT;
   hmi_f1_valve_pos AT %MW22 : INT;
   hmi_f1_flow AT %MW23 : INT;
   hmi_f2_valve_pos AT %MW24 : INT;
   hmi_f2_flow AT %MW25 : INT;
   hmi_purge_valve_pos AT %MW26 : INT;
   hmi_purge_flow AT %MW27 : INT;
   hmi_product_valve_pos AT %MW28 : INT;
   hmi_product_flow AT %MW29 : INT;
   scan_count AT %MW30 : UINT := 0;
@Thus0
Copy link
Contributor Author

Thus0 commented Aug 24, 2021

In fact, Aflow/feed2 is about 640 kMol/h (on my simulation HMI) but it's limited to 500 kMol/h (on ScadaBR HMI) because of this scaling (divide by 500)

flow = int(data["outputs"]["f2_flow"]/500.0*65535)

So I've divided by 700 in feed2.py and modified the multiplier (0,0106813153276875) on ScadaBR of Aflow so I can see the real value on the HMI instead of 500 kMol/h
MicrosoftTeams-image (2)

I think I need to update the scale also in the PLC program but I don't know what I need to change...
I've seen some "flow_max=500"

flow_max : REAL := 500.0;

Could you provide some help or update the scaling ? @djformby @sam-bryce

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

No branches or pull requests

1 participant