diff --git a/README.md b/README.md index b196f9d..558439d 100644 --- a/README.md +++ b/README.md @@ -1,95 +1,3 @@ # Universal Flow Skid -Reads from either a modbus flowmeter or an analog flowmeter. - -## Hardware Used - -- PLC: Micro820 (2080-LC20-20QBB) -- Slot 1: 2080-IF2 - -## Inputs -### Digital Inputs -| Input | Usage | -| ----- | ---------------------------- | -| 0 | Flowmeter Type (On = Modbus) | - - - -### Analog Inputs -| Input | Usage | -|--------- | ----------------- | -| 0 | 4-20mA Flowmeter | -| 1 | 4-20mA Pressure | - -## Outputs -### Digital Outputs -| Output | Usage | -| ------ | ----------------------- | -| 0 | Analog Flowmeter in use | -| 1 | Modbus Flowmeter in use | - -## Configuration -The system can be configured to use either an Analog Flowmeter or a Modbus Flowmeter. The system defaults to the Analog Flowmeter. - -### To enable the modbus flowmeter do one of the following: -- Jumper 24VDC to Digital Input 0 -- Write 1/True to the tag "sw_UseModbusFlowmeter" from SCADA - -### To enable the analog flowmeter do BOTH of the following: -- Remove the 24VDC jumper from Digital Input 0 -- Write 0/False to the tag "sw_UseModbusFlowmeter" from SCADA - -When the system is configured to use the Analog Flowmeter, Digital Output 0 will be ON. - -When the system is configured to use the Modbus Flowmeter, Digital Output 1 will be ON. - -### Customizing Modbus Parameters -The system defaults for modbus parameters enable communication with the Promag Modbus meters. The following tags can be modified to enable communication with different device types: - -| Tag | Default | Usage | -| ----------------------------- | ------- | ------------------------------- | -| cfg\_Flowmeter_ModbusNode | 1 | Node Address of Flowmeter | -| cfg\_FlowRate\_Register | 201 | Register of Flow Rate | -| cfg\_FlowTotalizerA\_Register | 203 | Register of Net Flow Total | -| cfg\_FlowTotalizerB\_Register | 205 | Register of Positive Flow Total | -| cfg\_FlowTotalizerC\_Register | 207 | Register of Negative Flow Rate | -| cfg\_ResetTotalizerA\_Coil | 104 | Coil to Reset Totalizer A | -| cfg\_ResetTotalizerB\_Coil | 105 | Coil to Reset Totalizer B | -| cfg\_ResetTotalizerC\_Coil | 106 | Coil to Reset Totalizer C | -| cfg\_Status\_Register | 1 | Register of Device Status | -| cfg\_Units\_Register | 61 | First Units Register | - -The serial port is configured as a Master for Modbus RTU over RS485 with baud rate of 9600, 8N2. - -## SCADA Tags -The following tags would be relevant to read over SCADA: - -| Tag | Type | Description | Access | -| -------------------------- | ------ | -------------------------------- | ------ | -| cmd\_ResetTotalizerA | BOOL | Reset Totalizer A | RW | -| cmd\_ResetTotalizerB | BOOL | Reset Totalizer B | RW | -| cmd\_ResetTotalizerC | BOOL | Reset Totalizer C | RW | -| Flow\_EU\_Max | REAL | EU Max Flow Scaling | RW | -| Flow\_EU\_Min | REAL | EU Min Flow Scaling | RW | -| Pressure\_EU\_Max | REAL | EU Max Pressure Scaling | RW | -| Pressure\_EU\_Min | REAL | EU Min Pressure Scaling | RW | -| cmd\_ClearFlowTotal | BOOL | Clear analog Flow Total Command | RW | -| sw\_UseModbusFlowmeter | BOOL | Use the modbus flowmeter | RW | -| use\_ModbusFlowmeter | BOOL | Status of using Modbus Flowmeter | R | -| sts\_FlowMeterModbusOK | BOOL | Flowmeter Modbus OK Status | R | -| val\_Pressure | REAL | Pressure Reading | R | -| val\_AI00\_uA | REAL | uA Reading on AI00 | R | -| val\_AI01\_uA | REAL | uA Reading on AI01 | R | -| val\_FlowRate | REAL | Flow Rate | R | -| val\_FlowTotalizerA | REAL | Flow Totalizer A (Net Flow) | R | -| val\_FlowTotalizerB | REAL | Flow Totalizer B (Fwd Flow) | R | -| val\_FlowTotalizerC | REAL | Flow Totalizer C (Rev Flow) | R | -| val\_FlowRate\_Units | STRING | Flow Rate Units | R | -| val\_FlowTotalizerA\_Units | STRING | Flow Totalizer A Units | R | -| val\_FlowTotalizerB\_Units | STRING | Flow Totalizer B Units | R | -| val\_FlowTotalizerC\_Units | STRING | Flow Totalizer C Units | R | -| val\_StatusString | STRING | FlowMeter Status | R | - -## Contributors -- [Patrick McDonagh](https://github.com/patrickjmcd) - Owner -- Ben Nabors - Collaborator +For documentation, see the [doc site](https://henry-pump.github.io/Flow-Skid-Universal/). diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..b196f9d --- /dev/null +++ b/docs/index.md @@ -0,0 +1,95 @@ +# Universal Flow Skid + +Reads from either a modbus flowmeter or an analog flowmeter. + +## Hardware Used + +- PLC: Micro820 (2080-LC20-20QBB) +- Slot 1: 2080-IF2 + +## Inputs +### Digital Inputs +| Input | Usage | +| ----- | ---------------------------- | +| 0 | Flowmeter Type (On = Modbus) | + + + +### Analog Inputs +| Input | Usage | +|--------- | ----------------- | +| 0 | 4-20mA Flowmeter | +| 1 | 4-20mA Pressure | + +## Outputs +### Digital Outputs +| Output | Usage | +| ------ | ----------------------- | +| 0 | Analog Flowmeter in use | +| 1 | Modbus Flowmeter in use | + +## Configuration +The system can be configured to use either an Analog Flowmeter or a Modbus Flowmeter. The system defaults to the Analog Flowmeter. + +### To enable the modbus flowmeter do one of the following: +- Jumper 24VDC to Digital Input 0 +- Write 1/True to the tag "sw_UseModbusFlowmeter" from SCADA + +### To enable the analog flowmeter do BOTH of the following: +- Remove the 24VDC jumper from Digital Input 0 +- Write 0/False to the tag "sw_UseModbusFlowmeter" from SCADA + +When the system is configured to use the Analog Flowmeter, Digital Output 0 will be ON. + +When the system is configured to use the Modbus Flowmeter, Digital Output 1 will be ON. + +### Customizing Modbus Parameters +The system defaults for modbus parameters enable communication with the Promag Modbus meters. The following tags can be modified to enable communication with different device types: + +| Tag | Default | Usage | +| ----------------------------- | ------- | ------------------------------- | +| cfg\_Flowmeter_ModbusNode | 1 | Node Address of Flowmeter | +| cfg\_FlowRate\_Register | 201 | Register of Flow Rate | +| cfg\_FlowTotalizerA\_Register | 203 | Register of Net Flow Total | +| cfg\_FlowTotalizerB\_Register | 205 | Register of Positive Flow Total | +| cfg\_FlowTotalizerC\_Register | 207 | Register of Negative Flow Rate | +| cfg\_ResetTotalizerA\_Coil | 104 | Coil to Reset Totalizer A | +| cfg\_ResetTotalizerB\_Coil | 105 | Coil to Reset Totalizer B | +| cfg\_ResetTotalizerC\_Coil | 106 | Coil to Reset Totalizer C | +| cfg\_Status\_Register | 1 | Register of Device Status | +| cfg\_Units\_Register | 61 | First Units Register | + +The serial port is configured as a Master for Modbus RTU over RS485 with baud rate of 9600, 8N2. + +## SCADA Tags +The following tags would be relevant to read over SCADA: + +| Tag | Type | Description | Access | +| -------------------------- | ------ | -------------------------------- | ------ | +| cmd\_ResetTotalizerA | BOOL | Reset Totalizer A | RW | +| cmd\_ResetTotalizerB | BOOL | Reset Totalizer B | RW | +| cmd\_ResetTotalizerC | BOOL | Reset Totalizer C | RW | +| Flow\_EU\_Max | REAL | EU Max Flow Scaling | RW | +| Flow\_EU\_Min | REAL | EU Min Flow Scaling | RW | +| Pressure\_EU\_Max | REAL | EU Max Pressure Scaling | RW | +| Pressure\_EU\_Min | REAL | EU Min Pressure Scaling | RW | +| cmd\_ClearFlowTotal | BOOL | Clear analog Flow Total Command | RW | +| sw\_UseModbusFlowmeter | BOOL | Use the modbus flowmeter | RW | +| use\_ModbusFlowmeter | BOOL | Status of using Modbus Flowmeter | R | +| sts\_FlowMeterModbusOK | BOOL | Flowmeter Modbus OK Status | R | +| val\_Pressure | REAL | Pressure Reading | R | +| val\_AI00\_uA | REAL | uA Reading on AI00 | R | +| val\_AI01\_uA | REAL | uA Reading on AI01 | R | +| val\_FlowRate | REAL | Flow Rate | R | +| val\_FlowTotalizerA | REAL | Flow Totalizer A (Net Flow) | R | +| val\_FlowTotalizerB | REAL | Flow Totalizer B (Fwd Flow) | R | +| val\_FlowTotalizerC | REAL | Flow Totalizer C (Rev Flow) | R | +| val\_FlowRate\_Units | STRING | Flow Rate Units | R | +| val\_FlowTotalizerA\_Units | STRING | Flow Totalizer A Units | R | +| val\_FlowTotalizerB\_Units | STRING | Flow Totalizer B Units | R | +| val\_FlowTotalizerC\_Units | STRING | Flow Totalizer C Units | R | +| val\_StatusString | STRING | FlowMeter Status | R | + +## Contributors +- [Patrick McDonagh](https://github.com/patrickjmcd) - Owner +- Ben Nabors - Collaborator