STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. ·...

34
STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-* 2018-04-17

Transcript of STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. ·...

Page 1: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

STW-Controller ESX_3CM/3CSWith HAWE Library

Quick Start Guide

Release: 7430b4d-*2018-04-17

Page 2: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

Versions

Date Content of change2017-11-20 Initial Creation2018-01-05 Function blocks2018-02-16 LogiCAD2018-03-28 Flasher

2 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 3: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

COPYRIGHT

Copyright

All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic,electronic, or mechanical, including photocopying, recording, taping, or information storage andretrieval systems - without the written permission of the publisher.

Products that are referred to in this document may be either trademarks and/or registered trademarksof the respective owners. The publisher and the author make no claim to these trademarks.

While every precaution has been taken in the preparation of this document, the publisher and the authorassume no responsibility for errors or omissions, or for damages resulting from the use of informationcontained in this document or from the use of programs and source code that may accompany it. Inno event shall the publisher and the author be liable for any loss of profit or any other commercialdamage caused or alleged to have been caused directly or indirectly by this document.All rights reserved.

Printdate: April 18, 2018

3 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 4: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

CONTENTS

Contents

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.2 Visual Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.1 Addressing Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3 Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

4 Programming environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154.1 LogiCAD3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154.1.1 Winflash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204.2 Ethernet Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234.3 Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264.4 CAN_BUS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274.4.1 Bios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274.4.2 CAN_VALVES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284.4.3 CANIO14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294.4.4 Radio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294.5 Function Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294.6 FBs modified . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294.7 New FBs: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304.8 FBs no longer supported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

5 Safety Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

4 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 5: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

1. INTRODUCTION

1 Introduction

1.1 Introduction

STW and HAWE defined a close partnership. STW is providing powerful Controllers for hydraulicapplications with safety capabilities.These controllers can be programmed as described in the manuals of STW with calls of BIOS-functionalities and where the programmer has detailed control on each I/O of device.

HAWE customers, used to PLVC and the Visual Tool for scaling and trouble-shooting also have apossibility to link the HAWE_Layer, providing most features known to PLVC users, like :

a) scaling of inputs

b) writing to scaled outputs

c) Valve parameters for current control

d) parameters for a) and b) and c)

e) use of VisualTool

f) use of many Function Blocks of Openpcs (PLVC programming system)

1.2 Visual Tool

If Hawe_Layer is linked and called in program, there is full access to Controller by just one cyclic call.Access is possible both via RS232 or CANBUS 1 and 2.VT communications is also forwarded via Gateway functionality to other VT-supporting devices onCanbusses 2,3,4.The following screenshots also give a good impression of the I/Os of device.ESX_3CM will show like this:

5 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 6: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

1. INTRODUCTION

a) main menu

b) Survey on 28 Analog inputs

6 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 7: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

1. INTRODUCTION

c) single Analog input for scaling and configuration:

d) Survey on all 20 Proportional outputs

7 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 8: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

1. INTRODUCTION

e) Single proportional output

f) Survey of 8 PWM outputs

8 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 9: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

1. INTRODUCTION

g) Single PWM Output

h) Voltage, Temperature and Supply Voltages for Sensors

i) 4 Supply groups for Outputs with measured Voltages and Currents

9 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 10: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

1. INTRODUCTION

j) Four independent CAN-Bus-Instances

New features: Latest version offers possibility to invert the screen-colors.

10 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 11: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

2. INPUTS

2 Inputs

New Devices no longer have dedicated inputs for digital inputs or frequency inputs.Most Analog Inputs are also suitable to read digital input, frequency inputs and duty cycle at a certainfrequency. So the Parameter TYPE of AI has been extended.

The raw-value of Inputs, which can be scaled, is strongly depending on these types.The first two types return 10000 if input is 8.5 or 5V respectively. In case of errors of Supply it willreturn zero and error.0..24mA will return Micro-Amps i.e. 24000 at 24mAVoltage absolute returns milliVoltFrequecy returns 10th of Hz, i.e. 10000 at 1khzVoltage ratiometrically to Supply returns 10000, if input value equals supply voltage.PWM Duty Cycle returns 5000 at 50% duty cycle at inputSENT is reservedIf Application is set, Input will not be configured by HAWE_Layer, but will have to be configured byx_in_init of application.Pull_up activates a Pullup-resistor at input, if available and returns mVStrong Pull_down activates a low impedance Pulldown-resistor, if available and returns mVNext Type activates both pull-up and pull-down if available and returns mVCounter up only counts with one inputINCREMENTAL counts up-down with two inputs, see manual of Hardware.For last two types FQ_READ should be used, if values can become > 32767 !

11 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 12: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

2. INPUTS

2.1 Addressing Inputs

New programming system no longer supports variables with “physical” addresses like

Input1 AT %IW24.0 : INT; (*AI0*)Digin AT %IB0.0 : BOOL; (*digin 0*)

So when copying variables from an OpenPCS program to new System, you have to remove allAT %IWxx.y.

To read local inputs you can either use FunctionBlock GET_ANA or Function X_IN_GET_HAWE.Input1 := X_IN_GET_HAWE(0); (*AI0*)

To read Bits/Booleans from a CAN-Telegram or an Input, you can copy the value to a BYTE orWORD-Variable and then access the bits like this:

Alarm_word :WORD;Alarm_bit2: BOOL;

Alarm_word := _toWORD(can_read.i0); //Alarm_bit2 := Alarm_word.2;// Bit 2 of word

12 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 13: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

3. OUTPUTS

3 Outputs

All 28 Outputs must be written either by x_out_set_value (BIOS-call), of if HAWE_LAYER is used, byACT_VALVE, channel 0..27.Channels X_OUT_01 .. X_OUT_08 are the first 8 OP2A outputs,Channels X_OUT_09 .. X_OUT_12 are the OP4A outputsChannels X_OUT_13 .. X_OUT_19 are the next 8 OP2A outputs.Above 16 outputs are provided with current control if activated.8 OD2A outputs are used as PWM outputs without precise current control.(ACT_VALVE channel 20 to 27)

Relay Outputs:All Outputs are can be deactivated by Main-switches, called Relay_01 to Relay_04.There are groups of outputs having independent supply-pins and a Switch.Relais 01 is for outputs X_OUT1 to X_OUT8Relais 02 for outputs X_OUT9 to X_OUT12Relais 03 for outputs 13 to X_OUT 19Relais 04 supplies the 8 OD2A outputs X_OUT 20 to X_OUT 27

A new Menu for the Relays has been added to Visual Tool, V1.3.7It shows Voltages before and after Relay, raw-measured Current (having offset of about 180mA), State(Switched ON or not), Error Saved (for Errors already disappeared, i.e. short errors) and actual Error.

In above example Relays 1+2 are ok, Relaiy 3 is not supplied, Relaiy 4 is swiched off by software. If itwould not be by software, Errors would be shown like

13 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 14: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

3. OUTPUTS

a) Overvoltage; >38 Volt for short time

b) Overcurrent: Current >15A

c) SSV_ERR : Voltage range of SSV violated either upper or lower limit.

For details on a) and b) see “Technical Data”

Here SSV was configured to check for Voltage <9V. Error already disappeared, so it is only shown inError-saved.

Voltage after relays is nearly zero, although software had relay switched ON. -> Output deactivated byFirmware and not yet re-enabled by User-Software.

If one of the Relay-Errors is active, this error will also appear in the corresponding Error of Prop-output:

If Error state disappears, but Relay is still off, Error will turn to

Which means: OFF by Firmware.

14 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 15: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

4. PROGRAMMING ENVIRONMENT

4 Programming environment

Programming can be done either in C or in Structured Text (like Openpcs).

4.1 LogiCAD3

The Programming Package for IEC31113-1 comes as a >500mByte zip file, which must be unzippedto your computer.Make sure, not to unzip it into long Paths, as otherwise unzipping might fail.C:\lc might be a good destination.

Then also install compiler and copy license file to corresponding folder “licenses”.

It is recommended to use default folder c:\hightec as installation path.

First time open Logicad.3exe with administration rights.

15 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 16: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

4. PROGRAMMING ENVIRONMENT

Then a link to desktop is helpful, to easily re-start it next time.

Download the zipped HAWE-demo-project and unzip it to your computer.

Then re-open LogiCAD3 and start new project by selection of\File\import

Click NEXT, so this window opens:

Click Browse and select the folder, where you unzipped the HAWE example project.

16 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 17: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

4. PROGRAMMING ENVIRONMENT

Select above and click “Finish”.

Now it should look like this:

Now you can also copy and paste the project within Project Explorer.

17 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 18: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

4. PROGRAMMING ENVIRONMENT

You will be asked for name of copied project.

Insert your name and click ok.

You can now open the folder \src, which includes the ST-Files to edit.

As first step only MAIN and, if you use CAN-Bus, the CAN_0X-Files will be relevant.

You can double-click MAIN,

If no errors are shown, you hit ApplicationTest on right upper corner and select “Application Testing”

18 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 19: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

4. PROGRAMMING ENVIRONMENT

New window opens like this, where you open the object esx_3cm_example, Remote Configuration,mark esx_3cm, and click marked button to compile/generate Code.

In lower right corner, compiling process will be shown for some seconds with green progress bar, andhopefully not followed by Compiler error like here:

19 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 20: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

4. PROGRAMMING ENVIRONMENT

If Program has no errors, you can load it via WIN-Flash Tools see next chapter.

If C-Compiler is not (yet) licensed, this error will appear:

4.1.1 Winflash

Generated file has to be sent to device.Program Winflash has to be installed on Computer.First start of Winflash should be done with Administration rights to be able to save configuration file.New devices normally have 125kBaud, so you first configure Company ID to HWE, if this does notwork to Y1. Moreover set “Type of Hex File” to Automatic.

20 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 21: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

4. PROGRAMMING ENVIRONMENT

Make sure PCAN dongle is properly connected with termination and first CANBUS.Make sure stwpeak2.dll is selected as Comm-DLL:

Click “Search Node”, and power up device within 3 seconds.

This Windows should appear:

Click “Use”

Then Click “Configure Node”

21 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 22: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

4. PROGRAMMING ENVIRONMENT

Now you can adjust the baudrate. A high baudrate makes sense to speed up software transfer.Click “Reset” to return to first windows.There, you have to adjust the new Baudrate.

Moreover in Menu “Advanced Parameters” you should do these settings and click “Configure”:

22 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 23: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

4. PROGRAMMING ENVIRONMENT

Hit OK.

Then you must select the Hex-file

Depending on the path of the project, find

Now unpower device, Click “Flash Node” and repower device to transfer firmware.

Once you have loaded a firmware including HAWE_Layer, you do no longer need to reset device butyou can directly start by clicking “Flash Node”.

It makes sense to Click “View” in Hex-file Menu, to verify, it is the file with correct date.

When leaving Program via “Exit” the configurations are saved, if you have administration rights.

4.2 Ethernet Connection

To connect, first prepare your Ethernet adaptor:

A “private” or local Ethernet connection is recommended: i.e. a USB-Ethernet Adapter.Connection via the main Ethernet of Computer can make problems with DHCP and safety of companyethernet.

This adapter has to be set with an IP Address within the same range as the Device.

23 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 24: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

4. PROGRAMMING ENVIRONMENT

IP-Address of Device can be found and modified in remote configuration of ressource:

With right mouse-click on “Network” of your Explorer,

Selecting Properties

Selecting “Set Adapter properties”

Double-clicking on your Adaptor:

Select Properties

24 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 25: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

4. PROGRAMMING ENVIRONMENT

Doubleclick TCP&IP V4, and modify automatic IP address to fixed IP Address.

First three tripples of IP-address must be identical to device, last tripple must differ from device!

Click OK twice to close windows.

25 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 26: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

4. PROGRAMMING ENVIRONMENT

After loading program and resetting/restarting device, you can connect by clicking here on greensymbol in right upper corner:

Connecting should take < 3sec. and menu should look like this:

You can un-connect via red double-button (blue frame), or stop application via red button on right side.

If it takes >4sec, you should check Error-log after >10 sec and you can see this, if device or adaptorare not ready:

If you get this message, you could connect, but did not load the last program file, generated by LC3

4.3 Debugging

When having successfully connected, you can move (drag and drop ) variables of the resource to thevariables-window, and check and verify them, and modify, if they are not written by program.

26 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 27: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

4. PROGRAMMING ENVIRONMENT

Second way of debugging is to directly open the program file

With double-click to a variable of Program1 MAIN, the Program MAIN is opened, with Values ofvariables being shown:

This will help for debugging the ST-code on ST-Text-level.

Additionally using Visual Tool will help to debug setpoints written to outputs and check physical inputs.

4.4 CAN_BUS

4.4.1 Bios

You can use the API of STW, to read from and write to CANBUS:

You need to call once per CAN-Bus x_canbus_init to set baudrate,You need to call once per message x_can_obj_init for each read and each write object, which return

27 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 28: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

4. PROGRAMMING ENVIRONMENT

a Handle,And then in your application you check how many arrived telegrams you have byx_can_obj_get_buf_count and read the messages by x_can_obj_get_msg.Or you write by x_can_obj_send_msg. With each of the last functions, you need to give the Handleof x_can_obj_init.

If you use HAWE_LAYER, initialization of Baudrate of each CANBUS is done in first call depending onParameters, written in Visual tool (if a CAN-Bus is used by Bootloader, the Baudrate remains with thevalue of Bootloader).

(for compatibility reasons with PLVC projects, CAN_REC_INI combined withCAN_READ/CAN_READ_4INT/CAN_READ_BYTE etc. are still available, but only for CANBUS 0.)

If you want to use API for CANBUS, you have to do the calls of x_can_obj_init in first cycle of yourProgramm calling HAWE_LAYER..Because in second call, HAWE_LAYER does its x_can_obj_init-calls, with filter set to receive all(remaining) messages.

So starting in 3 rd cycle all received messages will result in a call of lcfu__CAN_READ_00, if HAWE_LIBis used.

So a FB named CAN_READ_00 must exist in your project, otherwise you will get a Compiler error.

Sample code provides a lcfu___CAN_READ_00 which calls also provided example-FBs CAN_01,CAN_02, CAN_03, CAN_04, i.e. one FB per CAN_BUS.These FBs are user-defined and can read each incoming message on each CANBus, evaluatingmsg.ID, msg.DLC (no. of valid bytes), msg.DAT[0..7].

Code for CAN_READ_00 is located in folder \oem-data and can be adjusted there.Sample code for reading CANIO and PSX_CAN is provided as well.

4.4.2 CAN_VALVES

LC3-Template provides code for 16 Valves at address 32+n*2

FB PSX_CAN_REC has to be called in receiving CANBUS receive (FB CAN_01 to CAN_04), justforwarding the telegram and Bus number.Bootup of Valves are detected, Startup is sent.

FB PSX_CAN must be cyclically called with call_type = 0 for timeout check.

FB PSX_CAN must be cyclically for each section with call_type = 1 and given Setpoint.Ramp parameters are sent oncem via SDO.Parameters for ramp_offs like in CAN_VALVE FB of PLVC.In VAR_GLOBAL section of Project, one instance of type CAN_VALV has to be instantiated.

28 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 29: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

4. PROGRAMMING ENVIRONMENT

4.4.3 CANIO14

LC3-Template provides code for reading all inputs of a CANIO14.

FB CANIO has to be called in receiving CANBUS receive (FB CAN_01 to CAN_04), just forwardingthe telegram and Bus number.

FB CANIO14 must be cyclically called for timeout check.

In VAR_GLOBAL section of Project, one instance of type CANIO14_TY has to be instantiated.

4.4.4 Radio

Plug+Play support is provided for different types of Canbus-Radio-Receivers:

Select here.

There is timeout-check for 120ms.

Inputs will be placed into AI 36 to AI 46, showing -1 as raw-value (not-connected) if there is timeout.

4.5 Function Blocks

4.6 FBs modified

Some FBs still have similar syntax, but had to be changed in meaning of parameters, or parametershave been added:

POS_READ and POS_INI:Channel from 0..3 (3cm 0..4). Initializing and reading the pairs. != channel of AI.Counters are same pins as AI.

29 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 30: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

4. PROGRAMMING ENVIRONMENT

AI-Type counter enables counter enables reading up-counter as raw-value however only from 0..32767.If up-down counter is needed, POS_INI with type=3 has to be called. Parameters FAK1 and FAK2removed. ERROR parameter added.OFFS: if not zero, Counter will be set to this value on call of POS_INIPOS_READ:Value in POS1, ERROR parameter added, DIRECTION added.

4.7 New FBs:

INPUTS_READ:

has to be called at beginning of each Cycle of main program to provide HAWE_LAYER:Update of all Analog inputs for next program cycle, check for Visual Tool Requests, and write Outputs.

GET_ANA_RAW: Read Raw-values (normally mV) of inputs.Channel 0..47 : AIChannel 100 .. 107: Analog value of PWM out, if used as Input

4.8 FBs no longer supported

FQ_INI, FQ_READ: as frequencies are now part of analog input selections, and Values will come asraw-value in 10 th of Hz, scaling can be done in AI

VALVE_INI: access to single parameters of prop. output possible via PUT_PARQ_INI: access to single parameters of dig. output possible via PUT_PARRAMP_INI: access to single parameters of ramps possible via PUT_PARANA_INI: access to single parameters of AI-scaling possible via PUT_PARI_INI: All Inputs are also Analog Inputs with Ramp, so debouncing of dig. In can be done by Ramps.DISP_VAL2

DISP_TXT, DISP_VAL, controlling 2line display will have to change in new application.16 character Strings can be generated by CONCAT, i.e. connection of several Strings.DISP_VAL now returns a String of the number with a fixed size, so it can also be used with CONCAT.DISP_TXT now writes such a string to canbus, depending on type selected.

FBs modifiedSPLINE_2 is provided in ST with modified parameters as arraySPLINE is provided in ST with different parameters as array

30 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 31: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

5. SAFETY PROGRAMMING

5 Safety Programming

Controllers can be programmed either with Safety Library or with standard library. Accordingly thehawe_lib_sl or hawe_lib has to be used.

In standard applications Function Block INPUTS_READ has to be called at start of user program toenable the HAWE Layer like scaling of inputs. In this case any change of Parameters in VT will resultin change of device parameters immediately.

In an application using safety layer, INPUTS_READ should be called cyclically in not-safety-relevantTask, and IO_INI has to be called (once) at beginning of safety relevant task to initialize IO, later safetyrelevant IO must be initialized manually.

Changes of Parameters in VT will partially only become active after saving value and rebooting.

Protected Parameters, which cannot be changed, if VT is called in NSR mode:

Analog input Type

PWM frequency of valve

Therefore a reset is needed after saving to Eeprom to make parameter work.

Moreover Visual Tool offers the possibility to set Outputs into “read-only” mode.

In this mode, output will not be initialized or written by HAWE_Layer, just the current is read.

31 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 32: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

5. SAFETY PROGRAMMING

The user has to call BIOS-call x_out_init and x_out_set_value to use the output, andxs_out_init_protected and xs_out_set_value in Safety-application. This way, HAWE_Layer has noacces to this output any more.

32 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 33: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

DISCLAIMER

Disclaimer

Information in this document is provided solely in connection with HAWE products. HAWE HydraulikSE and its subsidiaries ("HAWE") reserve the right to make changes, corrections, modifications orimprovements, to this document, and the products and services described herein at any time, withoutnotice.

All HAWE products are sold pursuant to HAWE’s terms and conditions of sale.Purchasers are solely responsible for the choice, selection and use of the HAWE products and servicesdescribed herein, and HAWE assumes no liability whatsoever relating to the choice, selection or useof the HAWE products and services described herein.

No license, express or implied, by estoppel or otherwise, to any intellectual property rights is grantedunder this document. If any part of this document refers to any third party products or services it shallnot be deemed a license grant by HAWE for the use of such third party products or services, or anyintellectual property contained therein or considered as a warranty covering the use in any mannerwhatsoever of such third party products or services or any intellectual property contained therein.

UNLESS OTHERWISE SET FORTH IN HAWE’S TERMS AND CONDITIONS OF SALE HAWEDISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND/ORSALE OF HAWE PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OFMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTSUNDER THE LAWS OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHTOR OTHER INTELLECTUAL PROPERTY RIGHT.

UNLESS EXPRESSLY APPROVED IN WRITING BY AN AUTHORIZE REPRESENTATIVE OF HAWE,HAWE PRODUCTS ARE NOT DESIGNED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY,AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING APPLICATIONS, NOR IN PRODUCTS ORSYSTEMS, WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY, DEATH,OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE.

Information in this document supersedes and replaces all information previously supplied.

33 / 32 Release: 7430b4d-* (2018-04-17) STW-Controller ESX_3CM/3CS

Page 34: STW-Controller ESX 3CM/3CSdownloads.hawe.com/3/0/ESX-3CSCM-Quick_Start-en.pdf · 2018. 4. 21. · STW-Controller ESX_3CM/3CS With HAWE Library Quick Start Guide Release: 7430b4d-*

HAWE Hydraulik SEEinsteinring 17 | 85609 Aschheim/München | GermanyPostfach 11 55 | 85605 Aschheim/München | GermanyTel +49 89 379100-1000 | Fax +49 89 379100-91000 | [email protected] | www.hawe.com

Release: 7430b4d-*2018-04-17