Overview Wallbox OCPP



This function block controls a charging station via OCPP 1.6J. In the Automatic operating mode the charging current is controlled so that only the PV surplus is charged. Since OCPP is supported by nearly all current charging stations, the block is not tied to one manufacturer.

In addition, the OCPP Central System block must be present in the project once. It opens the network port the charging stations connect to. Without that block the communication error output stays at 1.

One block controls one charge point. A charging station with two charge points is represented by two blocks: same identity, charge point number 1 and 2.

The charging current is given to the charging station as a charging profile. For the station to accept it, it must support the OCPP Smart Charging feature; the charging profile possible output shows this. If the charging station cannot handle a charging profile, the block only controls by starting and stopping the charging session - the surplus is then not controlled continuously but only used as a condition for starting.

Note on the Fronius Wattpilot: In the Fronius Solar.wattpilot app under Internet > OCPP, enable "OCPP 1.6J" and enter the controller as the server address, for example ws://192.168.1.50:8887/WP1. The Wattpilot only accepts an unencrypted address for a server inside your own network; for a server on the internet it requires an encrypted connection (wss://), which this block does not offer yet.

The Wattpilot supports Smart Charging, so it accepts the charging current as a charging profile in amperes, and it also supports switching between one and three phases. So that it does not immediately charge at full power when the vehicle is plugged in, authentication has to be switched on in the app - only then does the charging station wait for the release by the controller. The app shows the connection state; "Connected and accepted" means the central system has accepted the charging station. If it only shows "Connected", the identity does not match a block and "Accept unknown charge points" is set to No in the central system. The charging card identity does not have to be stored in the Wattpilot: by default it does not check charging sessions started by the central system against its own card list.



Inputs

BA
Operating mode*
Operating mode:
  • 0=Automatic: surplus control
  • 1=Manual: manual charging with the current value from the manual charging current input.
  • 2=Off: charging blocked, a running charging session is stopped.
  • 3=Offline: in this mode no commands are sent to the charging station, the state is still read. This allows parallel operation with the manufacturer's app.
LM
Manual charging current A
Charging current setpoint for the Manual operating mode in amperes.
PU
Current surplus*
PV surplus. The input must not be limited to 0, positive and negative values have to arrive at the input so that the control can react correctly. The surplus type parameter defines whether positive or negative means surplus.
LE Max. charging energy kWh Maximum charging energy of the current session in kWh. When this value is reached, the operating mode is set to Off and the input is set back to 0. With 0 the function is disabled.
FG Enable Additional enable for the surplus control. If the input is not connected, charging is considered enabled.
EN Unlock connector An edge from 0 to 1 asks the charging station to unlock the connector. Not every charging station supports this.
NS Restart charging station An edge from 0 to 1 restarts the charging station. A running charging session is ended properly. After the restart the charging profile is sent again automatically.

Outputs

ER
Communication error
Output is 1 when the charging station is not connected. While the output is 1, the remaining outputs keep their last value - they are not set to 0, so that no consumption of 0 appears in the recording.
ST Charge point state State of the charge point:
  • 0 = Unknown, no report from the charging station yet
  • 1 = Available, no vehicle connected
  • 2 = Vehicle plugged in, charging not started yet
  • 3 = Vehicle charging
  • 4 = Charging suspended by the vehicle
  • 5 = Charging suspended by the charging station
  • 6 = Charging finished, vehicle still connected
  • 7 = Reserved
  • 8 = Unavailable
  • 9 = Faulted
LL Charging power kW Current charging power in kW. If the charging station does not send a power value, it is calculated from current and voltage.
LA Current charging energy kWh Energy charged in the running session in kWh. The value is the meter reading of the charging station minus the reading at the start of the session.
LG Total charging energy kWh Meter reading of the charging station in kWh.
UA Surplus charging active Output is 1 when the surplus control is active.
SS Charging current setpoint A Setpoint that is sent to the charging station.
SI Charging current state A Charging current confirmed by the charging station. If the value differs from the setpoint permanently, the charging station has rejected the charging profile.
FC Charging station error code Error code of the charging station: 0 = no error, 1 = connector lock, 2 = communication to the vehicle, 3 = ground fault, 4 = high temperature, 5 = internal error, 6 = local list conflict, 7 = other error, 8 = over current, 9 = over voltage, 10 = power meter, 11 = power switch, 12 = card reader, 13 = reset failed, 14 = under voltage, 15 = weak signal.
LV Charging session active Output is 1 as long as a charging session is running in the charging station.
SC Charging profile possible Output is 1 when the charging station supports the OCPP Smart Charging feature and the charging current can therefore be set. With 0 the block only controls by starting and stopping.

Parameters

Charge point identity
Identity with which the charging station reports to the central system (the ChargeBoxId in OCPP). It is the last part of the address entered in the charging station and has to match exactly here. If the identity is unknown, the charging station can be connected first and the identity read from the log.
Charge point number Number of the charge point inside the charging station. For a charging station with one outlet this is 1.
Type of control Defines how the charging current is set:
  • Automatic: when connecting, the block asks the charging station whether it supports charging profiles and decides on its own.
  • Charging profile: a charging profile is always sent.
  • Switch on and off: the charging current is not set, only the charging session is started and stopped.
Charging card identity Identity with which the controller starts a charging session (the idTag in OCPP). If the charging station requires an authorized charging card, this identity has to be stored there.
Minimum charging current
Minimum charging current in amperes. According to the standard for electric vehicles this is 6 A.
Maximum charging current
Maximum charging current in amperes, up to 32 A depending on charging station and connection.
Gain P
Speed of the control, with a higher value the output reacts faster to a change at the input.
Surplus type Setting whether a positive or a negative value at the current surplus input means surplus.
Start at surplus Limit in W. This surplus has to be exceeded before the charging control starts.
Control on time Time in seconds the surplus has to stay above the limit before the control starts.
Control off time Time in seconds without any surplus until the control is stopped.
Minimum surplus Minimum surplus in W that is kept as a reserve during the control, for example when loads are switched on for a short time.
Number of phases Number of phases used for charging. The value is passed to the charging station in the charging profile and used to convert the setpoint into a power limit.
Voltage Mains voltage per phase. Only needed when the charging station does not accept a current limit and the setpoint has to be converted into watts.
Charging current dead band A new charging profile is only sent when the setpoint has changed by at least this value. This prevents a flood of messages and protects charging stations that store the charging profile permanently.
Repeat charging profile Time in seconds after which the charging profile is sent again even without a change. This way the charging station finds the correct setpoint again after a restart.
Minimum charging time Time in seconds a charging session runs at least before it is stopped because of a missing surplus. During this time the current is reduced to the minimum charging current. Without this time the charging session would be started and stopped constantly with changing cloud cover, which no vehicle likes.
Password Password of this charging station. Only used when the authentication in the OCPP Central System is set to password per charge point.
Request charging session With Yes the block requests the charging session itself as soon as a vehicle is plugged in and charging is wanted. With No it waits for the charging station to start the session on its own - the block then only sets the charging current. No is meant for charging stations that always start by themselves, for example after presenting a charging card.
Charging profile level Priority of the charging profile inside the charging station (the stackLevel in OCPP). Default 1. Some charging stations reject every charging profile above 0 - for those, set 0 here. If the charging current is not accepted and the charging current state output stays different from the setpoint, this is the first value to try.
Charging profile schedule Time reference of the charging profile:
  • Relative: the schedule starts with the charging session and is sent without a timestamp. This is the default and the simpler way for a plain current limit.
  • Absolute: the schedule is given the current time of the controller as its start. Some charging stations only accept this form.
Force limit in watts Normally the block asks the charging station whether it accepts a current or a power limit and follows that. With Yes the limit is always sent in watts, even if the charging station reports amperes. This helps with charging stations that state amperes but only actually apply a power limit. The conversion uses the voltage and number of phases parameters.
Debug With On the sent setpoints and every change of the operating mode and the surplus release are written to the log.


See also general parameters of all function blocks.