SCU System Manual
SCU System Manual
Contents
1 Introduction ................................................................................................................................................. 4
2 Background .................................................................................................................................................. 4
3 Components ................................................................................................................................................ 4
3.1 PLC (SCU) ............................................................................................................................................. 4
3.2 RML (Remote Monitoring and Log unit) .............................................................................................. 6
4 Software Installation ................................................................................................................................... 7
4.1 PLC (SCU) Software Modification Using CoDeSys 2.3.......................................................................... 7
Installing the PLC (SCU) Target .................................................................................................... 7
Installing CoDeSys 2.3 .................................................................................................................. 8
Using CoDeSys 2.3 and USB cable ............................................................................................... 9
4.2 RML Software Installation ................................................................................................................. 10
5 System configuration ................................................................................................................................. 12
5.1 PLC (SCU) I/O ..................................................................................................................................... 12
Digital inputs .............................................................................................................................. 12
Analog inputs ............................................................................................................................. 12
Digital outputs ........................................................................................................................... 12
5.2 PLC (SCU) Project Specific GUI Signal Configuration ......................................................................... 14
5.3 RML GUI Configuration ...................................................................................................................... 14
GenerateCSV.............................................................................................................................. 15
MyLanguages ............................................................................................................................. 15
MyPageStyle .............................................................................................................................. 15
MyVariableTexts ........................................................................................................................ 15
MyAlerts .................................................................................................................................... 16
MyTopMenu .............................................................................................................................. 18
MySubMenu .............................................................................................................................. 18
MyMonitors ............................................................................................................................... 19
Project Specific Monitors....................................................................................................... 20
MyParameters ........................................................................................................................... 21
MyLogDescription...................................................................................................................... 21
6 RML GUI ..................................................................................................................................................... 22
1
6.1 Overview, header and footer ............................................................................................................ 22
6.2 Parameters ........................................................................................................................................ 23
6.3 Tools .................................................................................................................................................. 24
6.4 Spreader Status ................................................................................................................................. 25
6.5 Crane Signals ..................................................................................................................................... 26
6.6 Diagnostics......................................................................................................................................... 27
6.7 Controls ............................................................................................................................................. 27
6.8 Admin ................................................................................................................................................ 29
7 Crane communication ............................................................................................................................... 30
7.1 CAN 2 - DS444 .................................................................................................................................... 30
7.2 DS444 Manufacturer Specific ............................................................................................................ 30
7.3 Bromma DS444 Gateway Configuration............................................................................................ 33
Set up Bromma DS444 Gateway ............................................................................................... 33
Default IO mapping.................................................................................................................... 33
Additional IO mapping – Manufacturer specific area ............................................................... 34
Sending the configuration – Reading the area size ................................................................... 36
7.4 CAN4 – ZCAN ..................................................................................................................................... 37
Selecting ZCAN as Crane Communication Protocol................................................................... 37
Configuring the ZCAN Communication...................................................................................... 37
ZCAN receive.......................................................................................................................... 38
ZCAN send.............................................................................................................................. 38
ZCAN I/O mapping ..................................................................................................................... 38
ZCAN Receive Mapping ......................................................................................................... 39
ZCAN Send Mapping .............................................................................................................. 39
7.5 CAN4 – BCAN ..................................................................................................................................... 41
Selecting BCAN as Crane Communication Protocol .................................................................. 41
Anybus Gateway ........................................................................................................................ 41
Anybus Mapping .................................................................................................................... 41
Example ................................................................................................................................. 42
SCS2 Node I/O ............................................................................................................................ 43
SCS2 A1 Node I/O ................................................................................................................... 43
Digital I/O............................................................................................................................... 43
Analogue I/O .......................................................................................................................... 44
PWM I/O ................................................................................................................................ 45
2
Serial Sensor .......................................................................................................................... 45
B2 Node I/O ........................................................................................................................... 45
B3 Node I/O ........................................................................................................................... 45
B6 Node I/O ........................................................................................................................... 45
Special, how to map a Byte variable.......................................................................................... 45
Special, how to map word over uneven addresses ................................................................... 46
Special, words need to be swapped because of different byte order ...................................... 49
7.6 Passing Custom Crane Signals to the RML GUI.................................................................................. 49
CoDeSys Configuration .............................................................................................................................. 50
Signals From the Crane .......................................................................................................... 50
Signals To the Crane .............................................................................................................. 51
RML Configuration ..................................................................................................................... 51
8 Adding Bromma Load Sensing System, LSS ............................................................................................... 53
9 Bromma SCU LogViewer Tool .................................................................................................................... 55
10 Service without RML using CoDeSys 2.3 ............................................................................................... 56
10.1 System Status .................................................................................................................................... 56
10.2 Changing Spreader Parameter Values ............................................................................................... 56
10.3 Node Search ...................................................................................................................................... 56
10.4 Change NodeID .................................................................................................................................. 57
11 Diagnostic blocks ................................................................................................................................... 58
11.1 Twist lock Event Messages ................................................................................................................ 58
11.2 Twin Up/Down Event Messages ........................................................................................................ 58
11.3 Single Telescope Event Messages ..................................................................................................... 59
11.4 Twin telescope Event Messages ........................................................................................................ 59
11.5 TTDS Event Messages ........................................................................................................................ 60
11.6 Flippers Event Messages ................................................................................................................... 60
11.7 General Event Messages ................................................................................................................... 60
11.8 DS444 Gateway Event Messages ....................................................................................................... 61
11.9 Event handler .................................................................................................................................... 61
3
1.0 2016-06-08 Gösta Agerberg Creation of document
Update after comments from Fredrik and Hasse. Removed System Description and put
1.1 2016-09-16 Gösta Agerberg
in a separate document.
1.2 2017-03-01 Nils Breitholtz Name update etc.
1.3 2017-07-13 Nils Breitholtz LED description SCU(PLC) updated
1.4 2018-02-22 Nils Breitholtz New RML Crane Com mappining
1.5 2018-07-13 Nils Breitholtz Added load sensing
1.6 2019-07-05 Nils Breitholtz Added DS444 gateway mapping
1 Introduction
The purpose of this document is to describe and specify the functionality of the SCU(Spreader Controller
Unit) system. Description of the different cases regarding crane communication and control systems will be
discussed as well as different options for configuration, diagnosis and visualization.
This document will describe the SCU system, consisting of a controller and a wireless module used for the
GUI. If the controller is used separately please disregard the information concerning the wireless module.
2 Background
The SCU –Spreader Controller Unit application software is based on the architecture of the SCS3
architecture. However, the target system of the PLC (SCU) contains a lot of hardware dependent libraries
and function blocks which are a bit different that the standard libraries provided by 3s. Also the diagnostic
system is totally different. Therefore, the individual programs, functions blocks and functions have been
customized for the SCU platform. The main part that remains the same is the component library, thus it is
ensured that all spreader functionality remains unaltered.
3 Components
3.1 PLC (SCU)
The PLC (SCU) is a freely programmable controller developed. The PLC (SCU) has 16 inputs / 16 outputs and 4
CAN interfaces and will serve as the controller in the SCU system. The necessary input signals for running the
spreader will either be available through the configurable I/O’s or via CAN. The communication with the
crane will either run using BCAN, ZCAN or DS444.
4
The PLC (SCU) has a LED light at the front which indicates the operating states as explained below:
5
3.2 RML (Remote Monitoring and Log unit)
The RML is a wireless CAN-bus to Wi-Fi module. It comes with 1 CAN interface and has a built in 64MB HTTP-
server which can store web pages, files and event logs. The RML works as the GUI unit in the SCU system,
allowing the user access to information about the system directly through any device with a Wi-Fi
connection such as a laptop, smartphone etc.
The RML is configured using an Excel file, where different parameters, monitors and texts can be added to
give the GUI the wanted design.
The RML module is equipped with 2 bicolored LEDs. One LED for CAN status and one for Wi-Fi status.
6
4 Software Installation
First download and run the latest SCU template release installation software
Customer Installation
To connect to the PLC (SCU) the installation of USB driver is necessary. Please follow these steps:
Click Install (see Figure 4-3 Installing the PLC (SCU) target file using 3S InstallTarget).
7
Figure 4-2 Target file location
Figure 4-3 Installing the PLC (SCU) target file using 3S InstallTarget
8
CoDeSys on Bromma Backyard
and download the file “CoDeSys_v23944.zip” and the “Readme.txt”. This will provide you with a copy of
CoDeSys 2.3 and documentation of how to install the program.
C:\Bromma Conquip\Templates\SCU
If a change in code is necessary, follow these steps after the update is done (italics are menu commands):
9
4.2 RML Software Installation
The RML is configured using a PC and an Internet browser, the preferred browser for browsing and
configuring the RML is Google Chrome.
2) Access the RML Firmware Upgrade page: http://192.168.0.1/WCB/login.esp (Figure 4-5 RML
Firmware update)
3) Login using the maintenance password, on delivery this is: BRmaint2016
4) Login using the administrator password: br2016admin
5) Choose the .fsys file, located at
C:\Bromma Conquip\SCU Platforms\RML\FW
6) Click “Update File System” and wait until the update is done (there is a progress indicator at the
bottom left corner of the page). When the update is done, click “Go back”
7) Choose the .mprog file, located at
C:\ Bromma Conquip\SCU Platforms\RML\FW
8) Click “Update Main Program” and wait until the update is done
9) Reboot the RML unit by disconnecting and reconnecting the power.
The RML is now ready for being configured using a .csv file, please see chapter 0 for instructions how to
configure and generate this file. When the file is configured and ready proceed with uploading it to the RML
accordingly:
10
2) Access the RML Firmware Upgrade page: http://192.168.0.1/WCB/Admin/ (Figure 4-6 RML csv
configuration pageFigure 4-5 RML Firmware update)
3) Login using the maintenance password, on delivery this is: BRmaint2016
4) Select the .csv file. For a project the .csv is bundled together with the .pro file (found at Bromma
Backyard). If a new configuration is to be done the templates are located at
C:\Bromma Conquip\Templates\SCU
5) Click “Upload new .csv configuration file” and wait until the upload is done
6) After this is complete the RML will redirect the user to the start page
11
5 System configuration
Digital inputs
To map a digital input, locate an empty spot under “Inputs [FIX]” and declare the variable there. Make sure
that there is no analogue input mapped for the same pin by looking in “Inputs Analog [FIX]”.
Analog inputs
To map a analog input, locate an empty spot under “Inputs Analog [FIX]” and declare the variable there.
Make sure that there is no digital input mapped for the same pin by looking in “Inputs [FIX]”.
Digital outputs
To map a digital output, locate an empty spot under “Outputs [FIX]” and declare the variable there. The first
10 outputs, output0 – output9 are not available for digital outputs as they are mapped to be used as PWM
outputs for spreader LEDs.
12
Figure 5-1 PLC (SCU) I/Os
13
5.2 PLC (SCU) Project Specific GUI Signal Configuration
To simplify the adding of project specific signals to the GUI, a function block has already been added to the
PROJECT_SPECIFIC_PAGE block under SPREADER_APPLICATION (Figure 5-2 Project specific GUI block).
Enable PS block
To set up a new signal to be sent to the RML GUI follow the simple guidelines below:
1) Enable the PS block by setting the first bool to TRUE (see “Enable PS block” in Figure 5-2 Project
specific GUI block)
2) Enable the message type that is of the correct type (see Figure 5-2 Project specific GUI block and
Table 1)
3) Connect the wanted signal to the correct type of input
4) Connect the signal in the RML Excel configuration file, see 5.3RML GUI Configuration
Start by opening the Excel configuration file, there is a template for each type of spreader located in
subfolders at:
C:\Bromma Conquip\Templates\SCU\
14
Below follows a short description of the different tabs in the file. There is also help to be found in the
comments made in the top row of each Excel sheet.
GenerateCSV
This tab is used to generate the .csv file. When done configuring the Excel file, press the button and save the
resulting .csv file.
MyLanguages
This tab lists the current available languages. No editing is allowed in this tab.
MyPageStyle
This tab shows the current page style used. No editing is allowed in this tab.
MyVariableTexts
This tab lists the texts being used in the GUI. Adding new texts is allowed, however editing or deleting
existing texts is not.
Follow this generic example to add a new text to be used in the RML GUI:
15
1) Input a unique ElementID, starting with “Class” at the monitor or parameter of choice (either
“MyMonitors” or “MyParameters” tab) (Figure 5-6 MyVariableTexts Example: Declare new
VariableText ). The texts can be of a few different kinds, in this example a header is created.
2) Enter the ElementId in column B in the tab “MyVariableTexts” (Figure 5-7 MyVariableTexts Example:
Connect new VariableText ).
3) Enter a description in column C in the tab “MyVariableTexts” (Figure 5-8 MyVariableTexts Example:
Create text for new VariableText ).
MyAlerts
This tab lists the alert texts being used in the GUI. Adding new alert texts is allowed, however editing or
deleting existing alert texts is not.
New entries are only needed if extra parameters are added with the option <confirm:alertName>.
16
Figure 5-9 MyAlerts
Follow this generic example to add a new alert text to be used in the RML GUI:
1) Input a unique ElementID at the parameter of choice ( “MyParameters” tab) (Figure 5-10 MyAlerts
Example: Declare new Alert)
2) Enter the ElementId in column B in the tab “MyAlerts” (Figure 5-11 MyAlerts Example: Connect new
Alert)
17
3) Enter a description in column C in the tab “MyAlerts” (Figure 5-12 MyAlerts Example: Create text for
new Alert)
MyTopMenu
This tab lists the current top menus, its index and whether each menu is visible or not. In column F the title
of each menu is listed.
MySubMenu
This (Figure 5-14 MySubMenu) tab lists the current sub menus, its top menu index (column B), sub menu
index (column C) and whether each menu is visible or not (column D). In column F the title of each menu is
listed.
Adding new sub menus is allowed, however editing or deleting existing sub menus is not.
18
Figure 5-14 MySubMenu
MyMonitors
This (Figure 5-15 MyMonitors) tab lists the current monitors, signals between the PLC (SCU) and the RML.
For all monitors: Column K, “Visible”. Changing the value between TRUE or FALSE decides whether
the signal will be displayed in the RML GUI
Project specific monitors, monitor 220 – 313: See 5.3.8.1
19
Figure 5-15 MyMonitors
To add a new monitor, first follow the steps in 5.2 (PLC (SCU) Project Specific GUI Signal Configuration)PLC
(SCU) Project Specific GUI Signal Configuration, then do the following:
1) Locate the correct monitor, by identifying the input being used in CoDeSys (Figure 5-2 Project
specific GUI block)
2) In Column I respectively J, set “Menu” respectively “SubMenu” to the corresponding menu and sub
menu the monitor shall appear on
3) In Column K, set “Visible” to TRUE
4) In Column Q, set the title for the monitor (English)
OPTIONAL:
5) If needed, add other languages under their respective column
6) In Column S, a description can be added. This will be seen if the user hovers over the monitor
7) In Column O, a suffix can be added
8) In Column P, options can be added, available options are:
20
MyParameters
This (Figure 5-16 MyParameters) tab lists the current parameters, parameters that can be configured by the
RML, for example component settings etc.
The tab is locked for editing with the exception of column K, “Visible”. Changing the Boolean value changes
whether the parameter will be shown in the RML GUI or not.
MyLogDescription
This tab lists the current event log items (Figure 5-17 MyLogDescription). An item consists of its unique event
number (column B), the description (English in column C) and a sub code description (English in column E).
21
6 RML GUI
6.1 Overview, header and footer
In the header (
Figure 6-1 Header and footer) the general system information is displayed, along with the current access
level and the spreader ID. Note that if the Wi-Fi connection is lost, the other status signals turn blue with a
question mark since we cannot know what they are.
In the footer the option to change language exist, to change simply click the flag belonging to the language
wanted.
22
6.2 Parameters
Under PARAMETERS (Figure 6-2 Parameters tab) the different components parameters are listed, under
their respective sub menus. Each component consists of several parameters that is read at startup by the
RML. They are also possible to set when logged in as maintenance/manufacturer.
At the bottom of each component there is an option to reset the components parameters to factory
settings, this is done by checking the checkbox and clicking “Reset”. This also triggers the RML to refresh all
the parameters by reading them another time.
23
6.3 Tools
Under TOOLS (Figure 6-3 Tools tab) there is two sub menus (if logged on as manufacturer, otherwise only
one).
Under NODE CONTROL the user can trigger the PLC (SCU) to scan the spreader CAN network, see status and
information about connected nodes and change nodeIDs.
Under FACTORY SETTINGS the logged on manufacturer can save all current parameter values to factory
settings.
24
6.4 Spreader Status
Under SPREADER STATUS (Figure 6-4 Spreader status tab) the different component signals are shown. These
are sent asynchronously (as soon as the values are updated).
There is also an extra tab which by default holds the project specific signals that are being used, unless these
signals are explicitly moved to another tab.
25
6.5 Crane Signals
Under CRANE SIGNALS (Figure 6-5 Crane signals tab) the signals from the PLC (SCU) that concerns crane
communication are listed.
26
6.6 Diagnostics
Under DIAGNOSTICS (Figure 6-6 Diagnostics tab) two sub menus, EVENTS and COUNTERS are viewable.
COUNTERS shows the total number of containers lifted, as well as counters for the different categories of
lifts. If logged on as manufacturer the user can set/reset these counters. Setting/resetting the counters
results in an event message being generated, meaning that the total number of containers always can be
calculated.
EVENTS holds the log, and gives the user the possibility to go through the events either directly in the
browser or download them as a .csv. The user has to set a time span which is used to sort out the event
messages that are stored in the RML.
If the user chooses to download the .csv, the Bromma SCU LogViewer Tool can be used to graphically display
the events and allow the user a simple way of sorting and viewing parts of the log that is desirable.
6.7 Controls
Under CONTROLS (Figure 6-7 Controls tab) useful signals concerning the controlbox are listed. This page is
only viewable if the user has logged in as maintenance/manufacturer.
Here the user can first see the input given to the controlbox, as well as the telescope’s current position and
encoder values. It is also possible to manually set the values for the different available positions of the
telescope.
27
Figure 6-7 Controls tab
28
6.8 Admin
Under ADMIN (Figure 6-8 Admin tab) the user can find between one and four sub menus, depending on the
user access level. The currently installed RML firmware version is displayed on the right hand side, available
from rev 1.0.8 and later.
LOGIN is visible to everyone, and here the user can either log in as maintenance/manufacturer or log out.
SOFTWARE UPDATE provides the links to update the configuration .csv, to update the RML firmware and to
reach the RML Management page. This page is viewable if the user is logged in as
maintenance/manufacturer.
WIFI SETTINGS allows the user to set the SSID prefix of the Wi-Fi or change the current Wi-Fi password. The
Wi-Fi SSID prefix is by default set to “BROMMA”. As soon as a spreader ID has been set, the total Wi-Fi SSID
will be made up by “SSID_prefix – spreader_ID”. This page is viewable if the user is logged in as
maintenance/manufacturer.
PASSWORDS provide the possibility for the user to update the maintenance and manufacturer passwords.
This page is viewable if the user is logged in as manufacturer.
29
7 Crane communication
The crane communication is supported either with DS444, BCAN, ZCAN or parallel hard wire. This is
configurable in the GENERAL_CONFIGURATION function block.
To add a new output (to crane) signal simply put the desired variable as either a WORD (16 bit) or a BOOL (1
bit) in the PLC configuration, anywhere in TPDO 9 to 14 (Figure 7-2 DS444 Manufacturer specific, example of
adding signals to TPDO). This variable will then be copied to the object dictionary (OD) and transmitted on
the DS444 network.
30
Figure 7-2 DS444 Manufacturer specific, example of adding signals to TPDO
To add a new input (from crane) signal simply add a new variable as either a WORD (16 bit) or a BOOL (1 bit)
in the PLC configuration, anywhere in RPDO 9 to 12 (Figure 7-3 DS444 Manufacturer specific, example of
adding signals to RPDO).
31
Figure 7-3 DS444 Manufacturer specific, example of adding signals to RPDO
32
7.3 Bromma DS444 Gateway Configuration
From template release 2.5.0.0 and later it is possible to configure the DS444 anybus gateway in the CoDeSys
project. The standard default mapping is included by default, but in order to be able to send the
configuration to the Gateway, the variable g_EnableDS444MappingFromSCU must be set to TRUE in
GENERAL_CONFIGURATION.
Default IO mapping
The default DS444 IO mapping is divided in to two groups, to and from Crane. These to pages contains all
standard signals according to the DS444 standard mapping. Each input line consist of:
33
o Bit – Start bit
o Mask – used for special mapping
o Bits – Number of bits, only for special mapping
Datatype
Gateway
o Byte – Byte address in Anybus area
o Bit – Bit address in specified Byte
If something should be removed from the mapping, use (*…line*) to comment it out.
The page is prepared with the load sensing signals, which all have reserved addresses in PDO11-14.
To enable load sensing variables to be mapped, just take away the comments (**) and change the Gateway
Byte and Bit addresses according to the customer specific mapping addresses.
To add additional signals a new line must first be copied and inserted from the Example:
34
In this example there are two signals added.
1 input signal from the crane, Anybus address 18.0, has been added on PDO9, Byte 2, Bit 3.
1 input signal to the crane, Anybus address 20.3, has been added on PDO9, Byte 0, Bit 0.
These signals must be mapped and assigned to variables in the PLC configuration in order to be used in the
application.
35
Sending the configuration – Reading the area size
To write the configuration:
1) Go to “Resources” and “Global Variables” and find the object called “Global_status”
2) Set “g_ReadDS444MappingFromGateway” to TRUE to initiate a read request
3) The status string is shown in “g_DS444MappingGatewayStatus”
4) When the status has changed to “Read Done” the transfer is completed
5) The in and output size will be shown in “g_DS444InputArea” and “g_DS444OutputArea”
36
These two commands can also be initiated from the RML GUI.
To enable ZCAN, simply set the input “Enable_ZCAN” to TRUE. Make sure that all other Enable_XXX are set
to FALSE.
37
Figure 7-10 ZCAN Config function block
ZCAN receive
Variable Description Possible
Values
In_Receive_Enable Enable/Disable TRUE / FALSE
(bool)
In_Receive_ID COB-ID to receive messages 0 – 5000
(decimal)
In_Heartbeat_Time Time between received messages allowed before crane 0 – 5000 ms
communication is deemed to be not working (time)
ZCAN send
Variable Description Possible Values
In_Send_X_Enable Enable/Disable transmit block X TRUE / FALSE (bool)
In_Send_X_ID COB-ID used when transmitting message X 0 – 5000 (decimal)
In_Send_X_Transmitrate Time between sending message X 0 – 5000 ms (time)
This works equally for X = 1 to 3.
38
Figure 7-11 ZCAN IO Mapping
Figure 7-12 Example of ZCAN receive mapping. Byte 1, bit 4 is mapped to a bool variable
It is also possible to map a byte variable, and then an “UNPACK” function block has to be deleted and
replaced with a direct connection (see Figure 7-13).
39
Other mappings are also possible, however the logic for packing variables other than bools have to be built
for each project. For example to map a DWORD to be output to the crane follow this example:
1) A DWORD is 4 bytes, so add a pointer to a 4 byte array, and a 4 byte array to the variables in the
function block:
2) Set the address of the pointer to the address of the DWORD to be transmitted:
3) Set the array to the data of the pointer. NOTE! Don’t forget the “^” sign!
4) Using 4 of the TPDOs available bytes, copy the data from the array:
5) Don’t forget to delete the premade “PACK” function blocks connected to the bytes used (in this
example bytes 4 – 7).
40
7.5 CAN4 – BCAN
Selecting BCAN as Crane Communication Protocol
To select BCAN as the crane communication protocol, go to the tab “POUs”, in the folder called
“GENERAL_CONFIGURATION” there is a function block called “Select_Crane_Communication” (see Figure 7-9
Select_Crane_Communication).
To enable BCAN, simply set the input “Enable_BCAN” to TRUE. Make sure that all other Enable_XXX are set
to FALSE.
BCAN communication is either done using an Anybus Gateway or a SCS2 node. This is selected below the
“Select_Crane_Communication” function block.
Anybus Gateway
There are 4 configurations that can be made when communicating with an AnyBus card using BCAN:
If both “Input Size” and “Output Size” are zero the AnyBus is not activated, if any of them are nonzero the
AnyBus is activated and must be present when BCAN is selected.
Anybus Mapping
To map the AnyBus areas expand the “ANYBUS I/O [FIX]” and select “Input Area” or “Output Area”.
You can set WORD variables directly under the “Input Area” or “Output Area”, to map Bool variables expand
a WORD entry and map the Bool to any of the 16 Bit addresses (Figure 7-16).
41
Figure 7-16: - Out_ContainerCount is a Word mapped in the 2 first bytes of the Output Area
- Out_Locked is a Bool mapped on the second bit on the third byte.
Example
Receive a lock command from crane on Byte 3 and Bit 2 [byte: 0-63, bit: 0-7]:
1. Expand “Input Area”, then expand the second Word (Byte 2&3)
2. Enter “in_Lock_cmd” at Bit 9 (Figure 7-17). Bit 8 is the first bit of Byte3 , Bit 15 is the last
42
SCS2 Node I/O
Digital I/O
There is a total of 48 digital I/O, SD0800 – SD0847 put together into 12 groups, each group is activated in the
same way as showed above.
Expand A1 I/O to setup the I/O, the digital I/O is group four by four so each set must be configured
individually. To configure the first four digital I/O, select ”SD00080 - SD0803 [fix]” then expand the group and
enter variable names for the I/O (Figure 7-19).
43
Figure 7-19: Entering variables for the digital I/O SD0800- SD0803 on node A1
Analogue I/O
There are 2 analogue I/O, SA0800 and SA0801, select ”SA00080- SD0801 [fix]”, then expand the group and
enter variable names for the I/O (Figure 7-20).
44
PWM I/O
There are 4 PWM I/O, SP0800 and SP0803, select ”SA00080- SD0801 [fix]”, then expand the group and enter
variable names for the I/O.
(For more guidance see 7.5.3.3 Analogue I/O, the PWM I/O is activated and assigned a variable in the same
way)
Serial Sensor
Press the ”Serial Sensor [fix]”, then expand the group and enter variable names for the serial sensor.
(For more guidance see 7.5.3.3 Analogue I/O, the Serial Sensor I/O is activated and assigned a variable in the
same way)
B2 Node I/O
See section 7.5.3, the configuration of B2 Node I/O is performed in the same way.
B3 Node I/O
See section 7.5.3, the configuration of B3 Node I/O is performed in the same way.
B6 Node I/O
See section 7.5.3, the configuration of B6 Node I/O is performed in the same way.
1. Start by mapping a Word variable in PLC Configuration covering the Byte Address (Figure 7-21).
Figure 7-21: To map a Byte variable you need to map a temporary Word variable first.
2. Then you need to expand the first, the second or both of the Bytes from the Word (Figure 7-22).
45
The ideal place for doing this is under ”GENERAL_TAGS_PAGE” in ”SPREADER_APPLICATION”
Figure 7-22: Expanding both Bytes from a temporary Word and assigning them to Byte variables
3. The Byte variables need to be declared (Byte_0 and Byte_1 are only examples, use appropriate variable
names).
If they only are to be used in the ”SPREADER_APPLICATION” they can be declared there (Figure 7-22,Yellow),
otherwise declare them as global under ”ProjectSpecific_Variables” found in Resources tab.
1. Start by mapping a Word variable in PLC Configuration covering the Byte Address (Figure 7-21).
2. Then you need to add the first, the second or combine both of the Bytes from the Word (Figure 7-22).
46
Figure 7-23
Each bit in the word that is to be mapped need to be declared in the configuration.
Then in ”SPREADER_APPLICATION”, use the Function Block ”WordtoBits” to expand the bits from the Word
that is to be sent. (Figure 7-25)
When a Word from crane is mapped starting on an uneven address a special mapping is needed (Figure
7-24):
47
Figure 7-24
If the word is mapped on byte 1&2 both the Words on byte 0&1 and 2&3 needs to be declared. Then in
”SPREADER_APPLICATION”, use SHR, SHL and ADD to put together the Word that is received from crane.
(Figure 7-25)
Figure 7-25 Showing the use of Words mapped on uneven addresses both from and to crane
48
Special, words need to be swapped because of different byte order
The SCS2 and the SCS3 have different processors that handle storing of byte order in memory differently.
- SCS2 with a Motorola processor use big-endian and store the most significant byte first.
- SCS3 with an Intel processor use little-endian that store the least significant byte first.
So when they talk to each other, in the case of BCAN from spreader with SCS3 and crane with SCS2, we need
to swap the 2 bytes when communicating using Words.
”SwapWord” is a function that swaps the bytes from the “in_word” and returns the result in ”SwapWord”.
49
CoDeSys Configuration
Just like in SCS3, this is done using the function block “CRANE_GUI_APPLICATION” which is found in the
“Spreader Program” folder (see Figure 7-27).
The signals to the GUI are split into two groups, the first with signals coming from the crane and the second
for signals going to the crane. Each group is devided in to two sub groups, standard and custom..
50
This way all standard crane commands are already available in the RML GUI by default. So any crane
command that already mapped here does not have to be mapped separately.
In the Crane_Cmds_Custom macra there are three prepared function blocks to send signals to the RML GUI.
There is a block for BOOLs, one for BYTEs and one for WORDs. To add a signal, simply enable the block of the
desired signals datatype, and add inputs with the signals, see the example below.
RML Configuration
Start by opening the Excel configuration file. NOTE! Always use the latest project built for the particular
spreader, whether it’s a template or a project specific solution. Download the latest from Bromma Backyard.
51
Open the “MyMonitors” tab and find the row where the custom crane signals are listed (see below).
For all inputs used, locate the matching row in the Excel file, for example: TO_CRANE_BOOL2 is linked to the
input “CRANE_INTERFACE_BOOL_TO_CRANE” and input2.
NOTE! Make sure to keep signals to the crane from the signals from the crane.
1) In Column I respectively J, set “Menu” respectively “SubMenu” to the corresponding menu and sub
menu the monitor shall appear on
2) In Column K, set “Visible” to TRUE
3) In Column Q, set the title for the monitor (English)
OPTIONAL:
4) If needed, add other languages under their respective column
5) In Column S, a description can be added. This will be seen if the user hovers over the monitor
6) In Column O, a suffix can be added
7) In Column P, options can be added, hover over P1 to see the help (Error! Reference source not f
ound.)
52
8 Adding Bromma Load Sensing System, LSS
The SCU does not support load cells directly, instead the Bromma Stand-Alone load sensing system must be
used. All templates(2.3.0.0 or later) are prepared with a stand-alone controller device included in the PLC
configuration(ID 39). The stand alone unit comes with the display and it is necessary to set the
communication type to “SCU” in the stand alone system(required LSS sw version is 3.2.1.7 or later). The
node ID will then be set to 39, the same as the prepared node in the SCU PLC configuration. To enable the
LSS in the SCU CoDeSys project, locate GENERAL_CONFIGURATION and enable “g_ThisProjectHasLoadcells”.
For DS444 all load sensing variable are already mapped, including type approved variables(if enabled).
For BCAN or ZCAN the variables are mapped using the outputs from the Loadcells block in
SPREADER_LOADCELLS(PRG). All outputs are separated into WORDS’s and BOOL’s for mapping purposes and
the byte order can be swapped by setting the input “in_SwapValues” to TRUE. To swap type approved values
for BCAN, set the “g_TypeApprovedBCAN_SwapWeight” to TRUE in GENERAL_CONFIGURATION.
53
All load sensing signals are by default sent to the RML. The signals are already mapped in the Excel
configuration sheets and are enabled in the RML by setting the signals to visible under MyMonitors. All load
cells parameters are set using the stand-alone load cell display.
54
9 Bromma SCU LogViewer Tool
This is a tool designed to make it easier to handle the event log. The tool is available at Bromma’s backyard:
http://www.bromma.com/backyard/ftp/R&D/Software/SCU/Tools/LogViewer/
The event log consists of DABE messages, generated by the PLC (SCU) and timestamped and stored in the
RML. The user has a choice of either viewing the event log in the browser window or download it as a .csv
file.
Using the Bromma SCU LogViewer Tool the user can then open the .csv file, which loads the file and then
creates and opens a report file named as AAAAA_YYYYMMDD_HHMMSS where:
AAAAA is the Spreader ID, YYYYMMDD and HHMMSS is the date and time when the .csv was created.
The tool lists the event log messages, together with descriptions of the events and other information such
as the category of event, sub code description. It also shows some general information about the spreader,
several counters for different categories of lifts and much more.
The tool makes it easy to sort data using filters, combining these to look at certain events that might interest
the user. There is also a tool to regulate the time in the timestamps since the events are logged with UTC 0
time.
55
10 Service without RML using CoDeSys 2.3
10.1 System Status
Under “Resources” and “Global Variables” there is an object called “Global_status”. The most important
status variables are listed here:
Variable Description
g_WCBEnable Needs to be enabled in GENERAL_CONFIGURATION if used
g_GUIUnitRunning TRUE if enabled unit is running
g_SpreaderNetworkRunning Status of the CANopen network
g_DS444_NetworkRunning Status of the Crane network DS444
g_BCAN_NetworkRunning Status of the Crane network BCAN
g_ZCAN_NetworkRunning Status of the Crane network ZCAN
g_ZCANisConfigured True if ZCAN is configured (at least one PDO is to be sent/received)
a) Expand the Spreader type parameters by clicking the uppermost ”+” sign
d) Click the wanted value and edit it in the popup box. Both values and factoryvalues are stored in
persistent memory which means that they won’t be affected by a reset.
6) Go to “Resources” and “Global Variables” and find the object called “Global_status”
7) Set “g_ManualStartNodeSearch” to TRUE
8) When the variable g_NodeSearchStatus = Done the node search is done (approximately 20 seconds)
9) In the same object, the array called “NodesFound” will now present the nodes found on CAN1
56
10.4 Change NodeID
To perform a nodeID change (on the CAN1 interface), follow these steps:
Figure 10-1 Object tree reached under “Resources” and “Global variables”
57
11 Diagnostic blocks
11.1 Twist lock Event Messages
The event message in the SCS2 that are also supported in the SCS3/SCS4:
Dabe messages
Event
number Default text Subcode meaning Subcode type Severity
Time elapsed since
20000 All Unlocked unlock command Time[ms] (14) 0
Time elapsed since
20001 All Locked lock command Time[ms] (14) 0
20002 All landed Unspecified ( 0) 0
20004 Hoisted Unspecified ( 0) 0
20005 Unlock sensor lost Sensor Number ID (1) 1
20006 Lock sensor lost Sensor Number ID (1) 1
Unlock sensor
20007 missing Sensor Number ID (1) 1
20008 Lock sensor missing Sensor Number ID (1) 1
20009 Multiple Sensors Unspecified ( 0) 2
20012 Lock command Unspecified ( 0) 0
20013 Unlock Command Unspecified ( 0) 0
Landed override
20015 active Unspecified ( 0) 1
Dabe messages
Event
number Default text Subcode meaning Subcode type Severity
20500 Twin Boxes are up Unspecified ( 0) 1
20501 Twin Boxes are down Unspecified ( 0) 1
20503 Twin Latch Left Timeout Unspecified ( 0) 2
58
20522 Twin Up Command Unspecified ( 0) 0
20523 Twin Down Command Unspecified ( 0) 0
Dabe messages
Event
number Default text Subcode meaning Subcode type Severity
21000 Telescope In Position Position Number Length[mm] (3) 0
Telescope Knocked
21001 Out Of Position Error in Position [mm] Length[mm] (3) 0
Telescope Expanding
21004 Timeout Position [mm] at timeout Length[mm] (3) 0
Telescope Retracting
21005 Timeout Position [mm] at timeout Length[mm] (3) 2
Encoder Is Not
21006 Counting Unspecified ( 0) 1
Encoder Outside
21011 Taught Range Position [mm] Length[mm] (3) 1
Telescope Go Position
21012 Command Position Number Length[mm] (3) 2
Dabe messages
Event
number Default text Subcode meaning Subcode type Severity
20502 Twin Is In Zero Unspecified ( 0) 0
Twin Store Position 1
20529 Command Stored Position in mm Length[mm] (3) 0
Twin Store Position 2
20530 Command Stored Position in mm Length[mm] (3) 0
Twin Store Position 3
20531 Command Stored Position in mm Length[mm] (3) 0
Twin Teach Predefined
20532 Position 1 Command Teached Position in mm Length[mm] (3) 0
Twin Teach Predefined
20533 Position 2 Command Teached Position in mm Length[mm] (3) 0
Twin Teach Predefined
20534 Position 3 Command Teached Position in mm Length[mm] (3) 0
Twin Go Stored Stored Position Number
20535 Position Command (1, 2, 3) ID (1) 0
Twin Go Predefined Predefined Position
20536 Position Command Number (1,2,3) ID (1) 0
Twin Positioning
20537 Expand Command Unspecified ( 0) 0
59
Twin Positioning
20538 Retract Command Unspecified ( 0) 0
Twin Inch Expand
20539 Command Unspecified ( 0) 0
Twin Inch Retract
20540 Command Unspecified ( 0) 0
Position in mm when
20543 Twin Expand Timeout timeout occured Length[mm] (3)
Position in mm when
20544 Twin Retract Timeout timeout occured Length[mm] (3) 0
Twin Go To Set
20558 Position Command Set position for the twins Length[mm] (3) 0
Current Position wen set
20559 Twin in Set position pos was reached Length[mm] (3) 0
Dabe messages
Event
number Default text Subcode meaning Subcode type Severity
Lock Attempt With TTDS
20011 Fault Unspecified ( 0) 1
1 = Active, 0 =
22000 TTDS Override Deactivated ON/OFF (2) 0
22001 TTDS No Sensors Unspecified ( 0) 0
Dabe messages
Event
number Default text Subcode meaning Subcode type Severity
21500 Flipper Up Command Flipper,Corner Number Unspecified ( 0) 0
21501 Flipper Down Command Flipper,Corner Number Unspecified ( 0) 0
Dabe messages
Event
number Default text Subcode meaning Subcode type Severity
10000 System Started Unspecified ( 0) 0
Bus Warning on CAN1 /
10101 CAN2 CAN Interface nr 1/2(/3) ID (1) 1
10102 Bus off on CAN1 / CAN2 CAN Interface nr 1/2(/3) ID (1) 2
10109 Spreader Stop Activated ID (1) 0
Spreader Stop
10110 Deactivated ID (1) 0
11001 Node Running Node ID ID (1) 0
60
11002 Node Heartbeat Missing Node ID ID (1) 2
11003 Node Lost Master Node ID ID (1) 2
11005 CAN overrun Node ID ID (1) 1
11052 Recovered from Bus off Unspecified ( 0) 0
13003 BCAN Running Unspecified ( 0) 0
13004 BCAN Shutdown Unspecified ( 0) 1
Container Counter
23000 Backup Amount Unspecified ( 0) 0
Total Containers before
24000 set/reset Amount Unspecified ( 0) 0
Total Containers after
24001 set/reset Amount Unspecified ( 0) 0
Dabe messages
Event
number Default text Subcode meaning Subcode type Severity
12200 Gateway CAN overrun Node ID ID (1) 1
Heartbeat from SCS3
12201 Missing Node ID ID (1) 1
12202 External Anybus fault Node ID ID (1) 1
12203 External Anybus running Node ID ID (1) 1
Gateway out of
12204 configuration memory Node ID ID (1) 2
12205 Anybus HW init failed Node ID ID (1) 2
12206 Gateway EEProm Error Node ID ID (1) 2
Gateway CAN in passive
12207 mode Node ID ID (1) 1
12208 Gateway CAN bus Off Node ID ID (1) 1
No Contact With Crane
12209 Gateway Node ID ID (1) 1
Crane Gateway Com.
12210 Running Node ID ID (1) 0
Crane Gateway Com.
12211 Fault Node ID ID (1) 2
The diagnostic log is stored in the RML on CAN3. The RML receives the EMCY messages and stores them in
its flash drive. The RML can store approximately 1.2 million events, which can be downloaded from the RML
Diagnostics tab.
61