background image

 

200 

ifm

 System Manual 

ecomat

mobile

 SmartController (CR2500) V05 

More functions in the ecomatmobile controller

 

Counter functions for frequency and period measurement

10 

More functions in the ecomatmobile 
controller 

 

Counter functions for frequency and period measurement .................................................... 200 
Software reset......................................................................................................................... 215 
Saving, reading and converting data in the memory .............................................................. 216 
Data access and data check .................................................................................................. 223 
Processing interrupts .............................................................................................................. 232 
Use of the serial interface....................................................................................................... 239 
Reading the system time ........................................................................................................ 246 
Processing analogue input values.......................................................................................... 248 
Adapting analogue values ...................................................................................................... 253 

 

In this chapter you will find more functions that you can use in the 

ecomat

mobile

 controller. 

 

10.1 

Counter functions for frequency and period 
measurement 

 

Depending on the controller up to 16 fast inputs are supported which can process input frequencies of 
up to 30 kHz. Further to the pure frequency measurement at the inputs FRQ, the inputs ENC can be 
also used to evaluate incremental encoders (counter function) with a maximum frequency of 10 kHz. 
The inputs CYL are used for period measurement of slow signals. 

Input 

Frequency [kHz]  Description 

FRQ 0 / ENC 0 

30 / 10 

frequency measurement / encoder 1, channel A 

FRQ 1 / ENC 0 

30 / 10 

frequency measurement / encoder 1, channel B 

FRQ 2 / ENC 1 

30 / 10 

frequency measurement / encoder 2, channel A 

FRQ 3 / ENC 1 

30 / 10 

frequency measurement / encoder 2, channel B 

CYL 0 / ENC 2 

10 

period measurement / encoder 3, channel A 

CYL 1 / ENC 2 

10 

period measurement / encoder 3, channel B 

CYL 2 / ENC 3 

10 

period measurement / encoder 4, channel A 

CYL 3 / ENC 3 

10 

period measurement / encoder 4, channel B 

The following functions are available for easy evaluation: 

 

Summary of Contents for Ecomat Mobile Series

Page 1: ...System Manual SmartController CR2500 CoDeSys V2 3 Target V05 7390675 00 10 2009...

Page 2: ...t up programming system via templates 16 4 1 3 ifm demo programs 25 4 2 Function configuration of the inputs and outputs 29 4 2 1 Configure inputs 29 4 2 2 Configure outputs 33 4 3 Hints to wiring dia...

Page 3: ...nt error passive 56 8 5 5 Participant bus off 57 8 6 Description of the CAN functions 58 8 6 1 Function CAN1_BAUDRATE 59 8 6 2 Function CAN1_DOWNLOADID 61 8 6 3 Function CAN1_EXT 63 8 6 4 Function CAN...

Page 4: ...JOYSTICK_0 186 9 3 7 Function JOYSTICK_1 190 9 3 8 Function JOYSTICK_2 194 9 3 9 Function NORM_HYDRAULIC 197 10 More functions in the ecomatmobile controller 200 10 1 Counter functions for frequency a...

Page 5: ...ral 256 11 1 1 Self regulating process 256 11 1 2 Controlled system without inherent regulation 257 11 1 3 Controlled system with delay 257 11 2 Setting rule for a controller 258 11 2 1 Setting contro...

Page 6: ......

Page 7: ...stems ifm CD Software tools and documentation Nobody is perfect Send us your suggestions for improvements to this manual and you will receive a little gift from us to thank you All rights reserved by...

Page 8: ...on Refer to the table of contents to select a specific subject At the beginning of a chapter we will give you a brief overview of its contents Abbreviations and technical terms are listed in the gloss...

Page 9: ...authorised to work on the machine equipment Adhere to the technical data of the devices You can find the current data sheet on ifm s homepage at www ifm com Select country language Data sheet direct A...

Page 10: ...he CoDeSys software The document is intended for specialists These specialists are people who are qualified by their training and their experience to see risks and to avoid possible hazards that may b...

Page 11: ...ntation The application software can be easily designed by the user with the programming system CoDeSys Moreover the user must take into account which software version is used in particular for the op...

Page 12: ...ccording to the national regulations 3 3 PLC configuration The control system ecomatmobile is a device concept for series use This means that the controllers can be configured in an optimum manner for...

Page 13: ...y injury possible due to malfunctions The software functions described in this documentation only apply to the standard configurations In case of use of customer specific devices Note the special hard...

Page 14: ...libraries if necessary NOTE The software versions suitable for the selected target must always be used of the operating system CRnnnn_Vxxyyyzz H86 of the PLC configuration CRnnnn_Vxx CFG of the devic...

Page 15: ...s in CoDeSys Double click on PLC Configuration in the left column Display of the current PLC configuration following figure Based on the configuration the following is available in the program environ...

Page 16: ...cts with templates have been stored in the program directory of your PC ifm electronic CoDeSys V Projects Template_CDVxxyyzz Open the requested template in CoDeSys via File New from template CoDeSys c...

Page 17: ...ated with the following folder structure left Example for CR2500 as CANopen master Another example for CR1051 as CANopen slave via the folder structures in Templates Section About the ifm Templates pa...

Page 18: ...You want to supplement this project with further elements and functions chapter Supplement project with further functions page 23 About the ifm templates As a rule the following templates are offered...

Page 19: ...tion with layer 2 or as master or slave Contains functions for adjusting the monitor Programs and functions in the folders of the templates The above folders contain the following programs and functio...

Page 20: ...he folder PDM_COM_LAYER2 Description PLC_TO_PDM for Controller CAN operation with layer 2 or as slave Organises the communication from the Controller to the PDM monitors the transmission time transmit...

Page 21: ...ted Map these self created variables on the global softkeys Work only with the global softkeys in the program Advantage Adaptations are only required in one place SELECT_PAGE for PDM CAN operation wit...

Page 22: ...plates Only for PDM The visualisations are structured in folders as follows Folder Image no Description contents START_PAGE P00001 Setting display of node ID CAN baud rate status GuardErrorNode PLC cy...

Page 23: ...ontroller CR2500 as CAN open Master to which an I O CabinetModule CR2011 and an I O compact module are connected as slaves PLC configuration A joystick is connected to the CR2012 which is to trigger a...

Page 24: ...K In our example project the elements selected in the demo project have been added POUs Resources Insert the program CR2012 in the main program PLC_PRG e g The comments of the POUs and global variable...

Page 25: ...ated otherwise the demo programs apply to all controllers or to all PDMs The demo programs described here apply for CoDeSys from version 2 3 9 6 on the ecomatmobile CD from version 010500 Demo program...

Page 26: ...slave of a Controller CANopen master 8 x PWM output current controlled CR2500Demo_CR2512_xx pro I O smart module CR2512 as slave of a Controller CANopen master 8 x PWM output Display of the current c...

Page 27: ...AL CR1051Demo_Linear_logging_on_flash _intern_xx pro Writes a CVS data block with the contents of a CAN message in the internal flash memory home project daten csv when F3 is pressed or a CAN message...

Page 28: ...EXTLINE Figure P01000 Display of read text CR1051Demo_Real_in_xx pro Simple example for entering a REAL value in the PDM Figure P01000 Enter and display REAL value CR1051Demo_Ringlogging_on_flash _int...

Page 29: ...t certain marginal conditions must be taken into account when using the diagnosis It must be checked by means of the data sheet if the device used has the described input and output groups Constants a...

Page 30: ...he application software these faulty signals must be filtered if necessary Furthermore it has to be noted whether the pulse inputs are designed for frequency measurement FRQx and or period measurement...

Page 31: ...e as the controller So faulty measurements caused by offset voltage are avoided In case of digital evaluation the higher input resistance must be taken into account UB Analog Eingang Input Input Filte...

Page 32: ...ated via the system flag bit ERROR_Ix The system flag bit DIAGNOSE indicates wire break or short circuit of the input signal as group error Figure non electronic switches To monitor the input signals...

Page 33: ...nctions and no ERROR flags are set This is due to the structure of the outputs The function OUT_OVERLOAD_PROTECTION is not active in this mode NOTE If an output is switched off in case of a fault e g...

Page 34: ...rminal number QX0 3 IEC address for a binary output BH PH Hardware version of the output here Binary High side or PWMHigh side The different abbreviations have the following meaning A Analogue input B...

Page 35: ...ried out This temporary state is replaced by the Run or Stop state The LED lights orange for a short time 5 1 2 Run state This state is reached in the following cases From the reset state autostart Fr...

Page 36: ...erating voltage green 5 Hz no operating system loaded green 2 Hz RUN state green permanently on STOP state red 2 Hz RUN state with error red permanently on fatal error or stop with error yellow orange...

Page 37: ...nn_Vxxyyyzz LIB and the further files chapter Overview of the files and libraries used page 275 CRnnnn device article number Vxx 00 99 target version number yy 00 99 release number zz 00 99 patch numb...

Page 38: ...uction of the EEPROM possible The test input must not be activated permanently because otherwise the allowed write cycles are exceeded in the EEPROM 5 4 2 SERIAL_MODE The serial interface is available...

Page 39: ...depending on the device Access to this flags requires detailed knowledge of the CAN controller and is normally not required Flag NOT available for CR2500 CR0301 CR0302 By setting the ERROR system flag...

Page 40: ...ect that the operation LED if available lights red the ERROR output is set to FALSE and the monitoring relays if available are de energised So the outputs protected via these relays are switched off 6...

Page 41: ...corresponding bits The application program switches off outputs If necessary the error bit ERROR can be set additionally via the application program Consequences operation LED flashes red safety rela...

Page 42: ...on program the above mentioned recommendations must be complied with and tested If necessary the cycle time must be optimised by restructuring the software and the system set up It must also be taken...

Page 43: ...s Each activation prolongs the cycle time of the application program The following indications should be seen as reference values 7 2 Limits of the SmartController Current controller max 1 If possible...

Page 44: ...hysically existing RAM volatile fast memory 256 Kbytes Physically existing EEPROM non volatile slow memory 4 Kbytes Physical memory Physically existing FRAM non volatile fast memory Memory reserved fo...

Page 45: ...of the machine Programmieren in CoDeSys Programming in CoDeSys ja yes nein no Applikation testen Test application ja yes nein no Downloader Projekt auslesen Downloader Read project Downloader Projekt...

Page 46: ...al of the entire system by the responsible certification body e g T V BiA the latest version of the application program loaded in the controller using the ifm downloader has to be read from the contro...

Page 47: ...A limited number of spurs is allowed Moreover a ring type bus infotainment area and a star type bus central locking are possible Compared to the line type bus both variants have one disadvantage In t...

Page 48: ...7 The download system uses this identifier ID for the first communication with a non configured module via CAN The download ID can be set via the PLC browser of the programming system the downloader o...

Page 49: ...ing functions function CANx_RECEIVE page 73 receive CAN data and function CANx_TRANSMIT page 71 transmit CAN data Using these functions the following units are combined into a data object RAM address...

Page 50: ...principle the received data objects are automatically stored in a buffer i e without influence of the user Each identifier has such a buffer queue Depending on the application software this buffer is...

Page 51: ...network structure NOTE The line must be terminated at its two ends using a terminating resistor of 120 to prevent corruption of the signal quality The devices of ifm electronic equipped with a CAN int...

Page 52: ...nerates a difference voltage between the two bus cables The recessive and dominant states are converted into voltages in the bus nodes and detected by the receiver circuits 5 V 3 5 V 2 5 V 1 5 V 0 V U...

Page 53: ...matters the following dependence between bus length and baud rate can be assumed 10 0 50 1000 10000 5 10 20 50 100 200 500 1000 Bus L nge Bus length m Baudrate Baud rate kBit s Figure bus cable length...

Page 54: ...nto account The following table describes the dependence of the wire cross section referred to the cable length and the number of the connected nodes Cable length m Wire cross section at 32 nodes mm2...

Page 55: ...network Permanent functionality of the network even in case of a faulty CAN participant Differentiation between temporary and permanent disturbance of a CAN participant Localisation and self deactivat...

Page 56: ...vent this participant from disturbing bus communication by active error messages error active it is switched to error passive error passive error active bus off REC 127 or TEC 127 REC 128 and TEC 128...

Page 57: ...rom the bus bus off after exceeding a maximum count value To indicate this state the flag CANx_BUSOFF is set in the application program NOTE The error CANx_BUSOFF is automatically handled and reset by...

Page 58: ...rate baud rate must first be set for all participants of the CAN network For the controller this is done using the function CAN1_BAUDRATE page 58 for the 1st CAN interface or via the function CAN2 pa...

Page 59: ...r the bus participant Using this function the transmission rate for the controller is set To do so the corresponding value in kbits s is entered at the function input BAUDRATE After executing the func...

Page 60: ...ontroller Description of the CAN functions Parameters of the function inputs Name Data type Description ENABLE BOOL TRUE only 1 cycle function is executed FALSE function is not executed BAUDRATE WORD...

Page 61: ...for the program download and for debugging can be set The new value is entered when the function input ENABLE is set to TRUE The new download ID will become effective after voltage OFF ON or after a...

Page 62: ...V05 CAN in the ecomatmobile controller Description of the CAN functions Parameters of the function inputs Name Data type Description ENABLE BOOL TRUE only 1 cycle ID is set FALSE function is not execu...

Page 63: ...er CR2500 PDM360 smart CR1070 CR1071 Function symbol CAN1_EXT ENABLE START EXTENDED_MODE BAUDRATE Description The function CAN1_EXT initialises the first CAN interface for the extended identifier 29 b...

Page 64: ...L TRUE Function is executed FALSE Function is not executed START BOOL TRUE in the 1st cycle interface is initialised FALSE Initialisation cycle completed EXTENDED_MODE BOOL TRUE Identifier of the 1st...

Page 65: ...AN controller for transmission The function is called for each data object in the program cycle this is done several times in case of long program cycles The programmer must ensure by evaluating the f...

Page 66: ...identifier Permissible values 11 bit ID 0 2 047 29 bit ID 0 536 870 911 DLC BYTE Number of bytes to be transmitted from the array DATA Permissible values 0 8 DATA ARRAY 0 7 OF BYTE The array contains...

Page 67: ...e function must be called once for each data object during initialisation to inform the CAN controller about the identifiers of the data objects In the further program cycle CAN1_EXT_RECEIVE is called...

Page 68: ...uffer queue ID WORD Number of the data object identifier Permissible values normal frame 0 2 047 211 Permissible values extended frame 0 536 870 912 229 Parameters of the function outputs Name Data ty...

Page 69: ...ors If a certain number of transmission errors occurs the CAN participant becomes error passive If the error frequency decreases the participant becomes error active again normal condition If a partic...

Page 70: ...505 CR7506 SmartController CR2500 Function symbol CAN2 ENABLE START EXTENDED_MODE BAUDRATE Description The function CAN2 initialises the 2nd CAN interface The function must be called if the 2nd CAN in...

Page 71: ...TRUE function is executed FALSE function is not executed START BOOL TRUE in the 1st cycle interface is initialised FALSE initialisation cycle completed EXTENDED_MODE BOOL TRUE identifier of the 2nd CA...

Page 72: ...C DATA ENABLE Description CANx_TRANSMIT transmits a CAN data object message to the CAN controller for transmission The function is called for each data object in the program cycle also repeatedly in c...

Page 73: ...data object identifier Permissible values 0 2 047 DLC BYTE Number of bytes to be transmitted from the array DATA Permissible values 0 8 DATA ARRAY 0 7 OF BYTES The array contains a maximum of 8 data...

Page 74: ...VE configures a data receive object and reads the receive buffer of the data object The function must be called once for each data object during initialisation in order to inform the CAN controller ab...

Page 75: ...LEAR BOOL TRUE deletes the data buffer queue ID WORD Number of the data object identifier Permissible values 0 2 047 Parameters of the function outputs Name Data type Description DATA ARRAY 0 7 OF BYT...

Page 76: ...s per bit are possible For the second CAN interface max 256 IDs per 11 OR 29 bits are possible The second CAN interface requires a long initialisation time To ensure that the watchdog does not react t...

Page 77: ...he first data object identifier of the sequence Permissible values normal frame 0 2 047 211 Permissible values extended frame 0 536 870 912 229 LAST_ID CAN1 WORD CAN2 DWORD Number of the last data obj...

Page 78: ...78 ifm System Manual ecomatmobile SmartController CR2500 V05 CAN in the ecomatmobile controller Description of the CAN functions Example Initialisation of CANx_RECEIVE_RANGE in 4 cycles...

Page 79: ...E_ALL CONFIG ID CLEAR DATA DLC AVAILABLE OVERFLOW Description CANx_EXT_RECEIVE_ALL configures all data receive objects and reads the receive buffer of the data objects The function must be called once...

Page 80: ...LSE Function is not executed CLEAR BOOL TRUE Deletes the data buffer queue Parameters of the function outputs Name Data type Description ID DWORD ID of the transmitted data object DATA ARRAY 0 7 OF BY...

Page 81: ...e CAN interfaces and evaluates the CAN errors If a certain number of transmission errors occurs the CAN participant becomes error passive If the error frequency decreases the participant becomes error...

Page 82: ...unctions can be used for it If the automatic bus recover function is to be used default setting the function CANx_ERRORHANDLER must not be integrated and instanced in the program Parameters of the fun...

Page 83: ...erences e g CANOPEN_LED_STATUS are directly described in the corresponding functions It is absolutely necessary to use only the corresponding device specific library The context can be seen from the i...

Page 84: ...eriphery of a CoDeSys programmable controller As a result of this an ecomatmobile controller or a PDM360 display is called CAN master in the CAN configurator of CoDeSys This master is an NMT master an...

Page 85: ...at present supported by the ifm CANopen library Transmitting PDOs master transmits to slaves slave node device Transmitting event controlled i e in case of a change time controlled RepeatTimer or as...

Page 86: ...pend subelement For controllers with 2 or more CAN interfaces interface 1 is automatically configured for the master The following libraries and software modules are automatically integrated The Stand...

Page 87: ...60 compact both CAN interfaces can be used as CANopen master or CAN device For CRnn32 devices you can use all CAN interfaces with all protocols Tab CAN parameters The most important parameters for the...

Page 88: ...r the communication cycle period has elapsed The default value is 128 and should normally not be changed To activate transmission of the SYNC message the checkbox activate must be set NOTE The SYNC me...

Page 89: ...ycle time of the application program This means In a network with many slaves the master can process no further time critical tasks e g FB OCC_TASK A network with 27 slaves has a basic cycle time of 3...

Page 90: ...me must be longer than the SYNC time of the master The optimum value must be determined experimentally if necessary In most cases nodeguarding and heartbeat are sufficient for node monitoring Tab Rece...

Page 91: ...ndex name value type and default are indicated for every object The value can be changed Select the value and press the space bar After the change you can confirm the value with the button Enter or re...

Page 92: ...on of the corresponding slave To start the slaves the NMT command Start remote node is normally used As for the reset this command can be replaced by Start All Remote Nodes The service can be called v...

Page 93: ...sponds to the polling for object 100016 with a type other than the configured one in the lower 16 bits it is configured but marked as a wrong type All SDOs are repeated as long as a response of the sl...

Page 94: ...ically passed by the master and in the first cycles after a PLC start 3 State 3 of the master is maintained for some time In state 3 the master configures its slaves To do so all SDOs generated by the...

Page 95: ...ve is then polled again with the upload of the object 100016 Slaves with a problem during the configuration phase remain in state 3 or directly go to an error state state 5 after the configuration pha...

Page 96: ...determines the instant to start the CANopen slaves To do so the option Automatic startup of the CAN master must be deactivated in the configuration It is then up to the application to start the slave...

Page 97: ...s once at the same time Access to the status of the CANopen master You should poll the status of the master so that the application code is not processed before the IO network is ready The following c...

Page 98: ...ss authorisation can be freely used by the application of the master On the platform CoDeSys has no editor for this object directory The EDS file only determines the objects used to create the object...

Page 99: ...x must be used and for ss the sub index as hex values The number of the array entry is available in I You can now directly access the components of the entry It is sufficient to enter address length a...

Page 100: ...e the CAN device and in addition the objects defined by the parameter manager In the parameter manager only the list types parameters and variables can be used for the CAN device The library manages t...

Page 101: ...ile must be activated and the name of a file must be indicated As an option a template file can be indicated whose entries are added to the EDS file of the CAN device In case of overlapping the templa...

Page 102: ...2 ParameterName Product Code ObjectType 0x7 DataType 0x7 AccessType ro DefaultValue 0x0 PDOMapping 0 For the meaning of the individual objects please see the CANopen specification DS301 In addition to...

Page 103: ...as default value standard IO device and can be freely changed The index of the CAN controller results from the position of the CAN device in the controller configuration The nodeguarding parameters t...

Page 104: ...editor and PDOs transmitted received by the CAN device can be defined Such an assignment is called mapping In the object directory entries used variable OD the connection to variables of the applicat...

Page 105: ...e object directory parameter manager and link an index sub index to the variable PLC_PRG a To do so add a line to the variable list a click on the right mouse button opens the context menu and enter a...

Page 106: ...t PDOs and assign them the variable bytes from the list Changing the standard mapping by the master configuration You can change the default PDO mapping in the CAN device configuration within certain...

Page 107: ...irectory which are mapped to variables parameter manager However there are also automatically generated entries of the CAN device which cannot be mapped to the contents of a variable via the parameter...

Page 108: ...exchange variables This is a 1 to 1 connection using a confirmed protocol The user can check whether the message arrived at the receiver The exchange is not carried out automatically but via the call...

Page 109: ...k variables page 112 Settings in the global variable lists Create a new global variable list In this list the variables to be exchanged with other controllers are defined Open the dialogue with the me...

Page 110: ...isson unit For CAN the size of a transmission unit is 8 bytes If it is not possible to include all variables of the list in one transmission unit several transmission units are formed for this list If...

Page 111: ...s received in one cycle Parts of the variable list can be received in different cycles This is also possible for variables with structure and array types Transmit checksum This option is not supported...

Page 112: ...to create one receive PDO with this identifier Important Please note that the identifier of the network variables and of the receive PDOs must be entered as decimal value ClassicController CR0032 Ext...

Page 113: ...sage Under CANopen error states are indicated via a simple standardised mechanism For a CANopen device every occurrence of an error is indicated via a special message which details the error If an err...

Page 114: ...ub index 016 is increased to the number of the stored errors After all errors have been rectified the value 0 is written to the error field of the sub index 116 To delete the error memory the value 0...

Page 115: ...put voltage error 40xx Temperature error 41xx Ambient temperature error 42xx Device temperature error 50xx Device hardware error 60xx Device software error 61xx Internal software error 62xx User softw...

Page 116: ...information A device manufacturer can indicate additional error information The format can be freely selected Example In a device two errors occur and are signalled via the bus Short circuit of the ou...

Page 117: ...h 21h 03h I0 Diagnosis inputs bits I0 I7 00h 31h 05h Terminal voltage VBBo VBBs 00h 61h 11h Memory error 00h 80h 11h CAN1 monitoring SYNC error only slave 00h 81h 11h CAN1 warning threshold 96 10h 81h...

Page 118: ...r CR2500 PDM360 CR1050 CR1051 CR1060 PDM360 compact CR1052 CR1053 CR1055 CR1056 PDM360 smart CR1070 CR1071 Function symbol CANx_MASTER_EMCY_HANDLER CLEAR_ERROR_FIELD ERROR_REGISTER ERROR_FIELD Descrip...

Page 119: ...ts of the array ERROR_FIELD FALSE function is not executed Parameters of the function outputs Name Data type Description ERROR_REGISTER BYTE Shows the content of the object directory index 1001h Error...

Page 120: ...CR7232 CR7505 CR7506 SmartController CR2500 PDM360 CR1050 CR1051 CR1060 PDM360 compact CR1052 CR1053 CR1055 CR1056 PDM360 smart CR1070 CR1071 Function symbol CANx_MASTER_SEND_EMERGENCY ENABLE ERROR E...

Page 121: ...there is no error is sent after a delay of approx 1 s ERROR_CODE WORD The error code provides detailed information about the detected fault The values should be entered according to the CANopen specif...

Page 122: ...GENCY In this example 3 error messages will be generated subsequently 1 ApplError1 Code 16 FF00 in the error register 16 81 2 ApplError2 Code 16 FF01 in the error register 16 81 3 ApplError3 Code 16 F...

Page 123: ...MASTER_STATUS CANOPEN_LED_STATUS NODE_ID GLOBAL_START BAUDRATE CLEAR_RX_OVERFLOW_FLAG NODE_STATE CLEAR_RX_BUFFER SYNC CLEAR_TX_OVERFLOW_FLAG CLEAR_TX_BUFFER CLEAR_OD_CHANGED_FLAG CLEAR_ERROR_CONTROL R...

Page 124: ...g receive buffer overflow FALSE function is not executed CLEAR_RX_BUFFER BOOL FALSE TRUE edge Delete data in the receive buffer FALSE function is not executed CLEAR_TX_OVERFLOW_FLAG BOOL FALSE TRUE ed...

Page 125: ...o preoperation mode NodeStateList n SET_TIMEOUT_STATE TRUE set timeout for cancelling the configuration NodeStateList n SET_NODE_STATE TRUE set new node status Example code chapter Example with functi...

Page 126: ...ion chapter Access to the structures at runtime page 128 GET_EMERGENCY STRUCT EMERGENY_MESSAGE At the output the data for the structure EMERGENCY_MESSAGE are available The most recent error message of...

Page 127: ...To be able to access the information of the individual CANopen nodes an array for the corresponding structure must be generated The structures are contained in the library You can see them under Data...

Page 128: ...you can access the corresponding array element via the global variables of the library and therefore read the status or EMCY messages or reset the node If ResetSingleNodeArray 0 RESET_NODE is set to T...

Page 129: ...5 CAN in the ecomatmobile controller ifm CANopen library 129 8 7 8 Library for the CANopen slave The library ifm_CRnnnn_CANopenSlave_Vxxyyzz LIB provides a number of functions for the CANopen slave CA...

Page 130: ...21 CR7032 CR7200 CR7201 CR7232 CR7505 CR7506 SmartController CR2500 PDM360 CR1050 CR1051 CR1060 PDM360 compact CR1052 CR1053 CR1055 CR1056 PDM360 smart CR1070 CR1071 Function symbol CANx_SLAVE_NODEID...

Page 131: ...SmartController CR2500 PDM360 CR1050 CR1051 CR1060 PDM360 compact CR1052 CR1053 CR1055 CR1056 PDM360 smart CR1070 CR1071 Function symbol CANx_SLAVE_EMCY_HANDLER CLEAR_ERROR_FIELD ERROR_REGISTER ERROR_...

Page 132: ...Delete ERROR FIELD FALSE function is not executed Parameters of the function outputs Name Data type Description ERROR_REGISTER BYTE Shows the contents of the object directory index 1001h Error Registe...

Page 133: ...PDM360 CR1050 CR1051 CR1060 PDM360 compact CR1052 CR1053 CR1055 CR1056 PDM360 smart CR1070 CR1071 Function symbol CANx_SLAVE_SEND_EMERGENCY ENABLE ERROR ERROR_CODE ERROR_REGISTER MANUFACTURER_ERROR_F...

Page 134: ...re is no error is sent after a delay of approx 1 s ERROR_CODE WORD The error code provides detailed information about the detected fault The values should be entered according to the CANopen specifica...

Page 135: ...GENCY In this example 3 error messages will be generated subsequently 1 ApplError1 Code 16 FF00 in the error register 16 81 2 ApplError2 Code 16 FF01 in the error register 16 81 3 ApplError3 Code 16 F...

Page 136: ...S CANOPEN_LED_STATUS NODE_ID CLEAR_RX_OVERFLOW_FLAG BAUDRATE CLEAR_RX_BUFFER NODE_STATE CLEAR_TX_OVERFLOW_FLAG SYNC CLEAR_TX_BUFFER CLEAR_RESET_FLAGS CLEAR_OD_CHANGED_FLAG SYNC_ERROR GUARD_HEARTBEAT_E...

Page 137: ...ing the network with GLOBAL_START page 96 CLEAR_RX_OVERFLOW_FLAG BOOL FALSE TRUE edge Delete error flag receive buffer overflow FALSE function is not executed CLEAR_RX_BUFFER BOOL FALSE TRUE edge Dele...

Page 138: ...eceived OR the set SYNC time ComCyclePeriod in the master was exceeded GUARD_HEARTBEAT_ERROR BOOL No guard or heartbeat signal of the master received OR the set times were exceeded RX_OVERFLOW BOOL Er...

Page 139: ...ecomatmobile SmartController CR2500 V05 CAN in the ecomatmobile controller ifm CANopen library 139 8 7 9 Further ifm libraries for CANopen Here we present further ifm functions which are sensible addi...

Page 140: ...R1071 Available for the following devices PDM360 CR1050 CR1051 CR1060 PDM360 compact CR1052 CR1053 CR1055 CR1056 Function symbol CANx_SDO_READ ENABLE RESULT NODE IDX SUBIDX DATA LEN Description CANx_S...

Page 141: ...UBIDX BYTE Sub index referred to the index in the object directory DATA DWORD Address of the receive data array Permissible length 0 255 Transmission with ADR operator Parameters of the function outpu...

Page 142: ...052 CR1053 CR1055 CR1056 Function symbol CANx_SDO_WRITE ENABLE RESULT NODE IDX SUBIDX LEN DATA Description CANx_SDO_WRITE writes the SDO page 91 with the specified indexes to the node Using this funct...

Page 143: ...UBIDX BYTE Sub index referred to the index in the object directory LEN WORD Length of the entry in number of bytes The value for LEN must correspond to the length of the transmit array Otherwise probl...

Page 144: ...es or CANx_TRANSMIT to several plc cycles using several events Each call of CANx_TRANSMIT or CANx_RECEIVE generates a message packet of 8 bytes In the controller configuration the values for Com Cycle...

Page 145: ...and an 18 bit ID As for the software protocol the two standards do not differ because ISO 11992 is based on SAE J1939 Concerning the hardware interface however there is one difference higher voltage l...

Page 146: ...all relevant data has already been prepared it can be directly transferred to the functions Meaning Designation in the manufacturer s documentation Function input library function Example value Trans...

Page 147: ...fier 0CF0020316 PRIO reserv PG PF PS SA DA 0 C F 0 0 2 0 3 As these values are hexadecimal numbers of which individual bits are sometimes needed the numbers must be further broken down SA DA Source de...

Page 148: ...START MY_ADRESS Description J1939_x serves as protocol handler for the communication profile SAE J1939 To handle the communication the protocol handler must be called in each program cycle To do so th...

Page 149: ...terfaces to SAE J1939 149 Parameters of the function inputs Name Data type Description ENABLE BOOL TRUE function is executed FALSE function is not executed START BOOL TRUE only for 1 cycle protocol ha...

Page 150: ...s for receiving one individual message or a block of messages To do so the function must be initialised for one cycle via the input CONFIG During initialisation the parameters PG PF PS RPT LIFE and th...

Page 151: ...TE PDU Format Byte PS BYTE PDU Specific Byte DST DWORD Target address of the array in which the received data is stored RPT TIME Monitoring time Within this time window the messages must be received r...

Page 152: ...RANSMIT ENABLE RESULT PRIO PG PF PS SRC LEN RPT Description J1939_x_TRANSMIT serves for the transmission of messages The function is responsible for transmitting individual messages or blocks of messa...

Page 153: ...age priority 0 7 PG BYTE Page address normally 0 PF BYTE PDU Format Byte PS BYTE PDU Specific Byte SRC DWORD Memory address of the data array whose content is to be transmitted LEN WORD Number of byte...

Page 154: ...CR7201 CR7505 CR7506 SmartController CR2500 PDM360 smart CR1070 CR1071 Function symbol J1939_x_RESPONSE ENABLE RESULT CONFIG PG PF PS SRC LEN Description J1939_x_RESPONSE handles the automatic respons...

Page 155: ...y for 1 cycle for the configuration of the data object FALSE during further processing of the program PG BYTE Page address normally 0 PF BYTE PDU Format Byte PS BYTE PDU Specific Byte SRC DWORD Memory...

Page 156: ...O LEN DA DST PG PF PS Description J1939_x_SPECIFIC_REQUEST handles the request and receipt of data from a specific network participant The function is responsible for the automatic requesting of indiv...

Page 157: ...ed PRIO BYTE Priority 0 7 DA BYTE Logical address target address of the called device PG BYTE Page address normally 0 PF BYTE PDU Format Byte PS BYTE PDU Specific Byte DST DWORD Target address of the...

Page 158: ...PG LEN PF PS DST Description J1939_x_GLOBAL_REQUEST handles global requesting and receipt of data from the network participants The function is responsible for the automatic requesting of individual m...

Page 159: ...PRIO BYTE Priority 0 7 PG BYTE Page address normally 0 PF BYTE PDU Format Byte PS BYTE PDU Specific Byte DST DWORD Target address of the array in which the received data is stored Parameters of the fu...

Page 160: ...r PWM is available in the following controllers Number of available PWM outputs of which current controlled PWM outputs PWM frequency Hz ClassicController CR0032 16 16 2 2000 ClassicController CR0020...

Page 161: ...ed PWM outputs of the controller they must be initialised in the application program and parameterised corresponding to the requested output signal 9 1 1 PWM functions and their parameters general PWM...

Page 162: ...annels allow the most flexibility for the parameter setting The PWM channels 0 3 are available in all ecomatmobile controller versions depending on the type they feature a current control or not For e...

Page 163: ...tween 000016 und C35016 This results in the following mark to space ratios Mark to space ratio Switch on time Value for mark to space ratio Minimum 0 C35016 Maximum 100 000016 Between minimum and maxi...

Page 164: ...WM values are possible NOTE for ClassicController and ExtendedController applies If the PWM outputs 4 7 are used regardless of whether current controlled or via one of the PWM functions the same frequ...

Page 165: ...s NOTE When installing the ecomatmobile CD Software Tools and Documentation projects with examples have been stored in the program directory of your PC ifm electronic CoDeSys V Projects DEMO_PLC_CDV f...

Page 166: ...ir structure PWM values can be very finely graded So this function is suitable for use in controllers The function PWM is called once for each channel during initialisation of the application program...

Page 167: ...meters DITHER_FREQUENCY and DITHER_VALUE can be individually set for each channel Parameters of the function inputs Name Data type Description INIT BOOL TRUE in the 1st cycle function PWM is initialis...

Page 168: ...enables a simple application of the PWM function in the ecomatmobile controller The PWM frequency can be directly indicated in Hz and the mark to space ratio in steps of 1 This function is not suited...

Page 169: ...tion the value FREQUENCY for determining the dither frequency and the dither value VALUE are transmitted Info The parameters DITHER_FREQUENCY and DITHER_VALUE can be individually set for each channel...

Page 170: ...of the PWM outputs The function enables a simple use of the PWM function in the ecomatmobile controller The PWM frequency can be directly indicated in Hz and the mark to space ratio in steps of 1 The...

Page 171: ...ion the value FREQUENCY for determining the dither frequency and the dither value VALUE are transmitted Info The parameters DITHER_FREQUENCY and DITHER_VALUE can be individually set for each channel P...

Page 172: ...ts are protected against short circuit In the event of overload in which the currents are limited by cable lengths and cross sections to for example between 8 A and 20 A the measuring resistors shunts...

Page 173: ...ompensation value which has an influence on the integral and differential components of the controller To determine the best settings of the controller in the MANUAL mode the value 50 is suitable Depe...

Page 174: ...e 176 must be called The output value of OUTPUT_CURRENT is supplied to the input of ACTUAL CURRENT DESIRED_CURRENT WORD Desired current value in mA PWM_FREQUENCY WORD Permissible PWM frequency for the...

Page 175: ...hich has an influence on the integral and differential components of the controller To determine the best settings of the controller in the MANUAL mode the value 50 is suitable Depending on the reques...

Page 176: ...e DESIRED_CURRENT WORD Desired current value in mA PWM_FREQUENCY WORD Permissible PWM frequency for the load connected to the output DITHER_FREQUENCY WORD Dither frequency in Hz DITHER_VALUE BYTE Ampl...

Page 177: ...ACTUAL_CURRENT OUTPUT_CHANNEL DITHER_RELATED Description OUTPUT_CURRENT handles the current measurement in conjunction with an active PWM channel The function provides the current output current if t...

Page 178: ...y you can fulfil the following tasks Standardise the output signals of a joystick It is not always intended that the whole movement area of the joy stick influences the movement of the machine Often t...

Page 179: ...llowing principle In general digital outputs provide a fixed output voltage as soon as they are switched on The value of the output voltage cannot be changed here The PWM outputs however split the vol...

Page 180: ...This effect is reflected in a jerking movement especially at very low manipulating speeds Technology solves this problem by having the valve piston move slightly back and forth dither The piston is co...

Page 181: ...gure Too low frequencies of the PWM signal only allow rare jerking movements of the valve piston Each pulse moves the valve piston again from its off position every time the valve piston has to overco...

Page 182: ...itOS05_Vxxyyzz Lib contains the following functions Function CONTROL_OCC page 183 This function uses the function OUTPUT_CURRENT_CONTROL page 172 and the function OUTPUT_CURRENT page 176 from the libr...

Page 183: ...ue X to a specified current range Each instance of the function is called once in each PLC cycle The function uses the function OUTPUT_CURRENT_CONTROL page 172 and function OUTPUT_CURRENT page 176 fro...

Page 184: ...ts TIMEBASE 0 without ramp F_RAMP INT Falling edge of the ramp in in increments PLC cycle or increments TIMEBASE 0 without ramp TIMEBASE TIME Reference for rising falling edge of the ramp t 0s rising...

Page 185: ...ay Value 0 the self optimising performance of the controller is overwritten typical 50 Parameters of the function outputs Name Data type Description DESIRED_CURRENT WORD Desired current value in mA fo...

Page 186: ...ol JOYSTICK_0 X OUT1 XH_POS OUT2 ERR1 ERR2 XL_POS OUT3 XH_NEG WRONG_MODE XL_NEG MODE Description JOYSTICK_0 scales signals from a joystick to clearly defined characteristic curves standardised to 0 10...

Page 187: ...ve linear for the range XL to XH Mode 1 Characteristic curve linear with dead band Values fixed to Dead band 0 10 of 1000 increments Mode 2 2 step linear characteristic curve with dead band Values fix...

Page 188: ...values also permissible XL_POS INT Min preset value positive direction in increments negative values also permissible XH_NEG INT Max preset value negative direction in increments negative values also...

Page 189: ...to 10 increments e g for valve right OUT3 INT Standardised output value pairs of values 0 to 10 increments e g for valve on output module e g CR2011 or CR2031 WRONG_MODE BOOL Error invalid mode ERR1...

Page 190: ...CR0200 SafetyController CR7020 CR7021 CR7200 CR7201 CR7505 CR7506 SmartController CR2500 Function symbol JOYSTICK_1 X OUT1 XH_POS OUT2 ERR1 ERR2 XL_POS OUT3 XH_NEG WRONG_MODE XL_NEG R_RAMP F_RAMP TIME...

Page 191: ...ead band DB can be set in of 1000 increments 100 1000 increments DB Dead_Band Mode 2 2 step linear characteristic curve with dead band Values can be configured to Dead band 0 DB in of 1000 increments...

Page 192: ...ues also permissible R_RAMP INT Rising edge of the ramp in increments PLC cycle or increments TIMEBASE 0 without ramp F_RAMP INT Falling edge of the ramp in in increments PLC cycle or increments TIMEB...

Page 193: ...to 10 increments e g for valve right OUT3 INT Standardised output value pairs of values 0 to 10 increments e g for valve on output module e g CR2011 or CR2031 WRONG_MODE BOOL Error invalid mode ERR1...

Page 194: ...endedController CR0200 SafetyController CR7020 CR7021 CR7200 CR7201 CR7505 CR7506 SmartController CR2500 Function symbol JOYSTICK_2 X OUT1 XH_POS OUT2 XL_POS OUT3 XH_NEG ERR1 XL_NEG R_RAMP F_RAMP TIME...

Page 195: ...edge of the ramp in increments PLC cycle or increments TIMEBASE 0 without ramp F_RAMP INT Falling edge of the ramp in in increments PLC cycle or increments TIMEBASE 0 without ramp TIMEBASE TIME Refere...

Page 196: ...pairs of values 0 to 10 increments e g for valve right OUT3 INT Standardised output value pairs of values 0 to 10 increments e g for valve on output module e g CR2011 or CR2031 ERR1 BYTE Error code fo...

Page 197: ...HYDRAULIC X Y XH XL YH YL X_OUT_OF_RANGE Description NORM_HYDRAULIC standardises input values with fixed limits to values with new limits Please note This function corresponds to the 3S function NORM_...

Page 198: ...e Description X DINT Desired value input XH DINT Max input value increments XL DINT Min input value increments YH DINT Max output value increments e g valve current mA flow l min YL DINT Min output va...

Page 199: ...it value output YL 0 2000 0 Non standardised value X 20 20 20 Standardised value Y 400 1600 1 Case 1 Input with relatively coarse resolution Output with high resolution 1 X increment results in 20 Y i...

Page 200: ...n the controller up to 16 fast inputs are supported which can process input frequencies of up to 30 kHz Further to the pure frequency measurement at the inputs FRQ the inputs ENC can be also used to e...

Page 201: ...ion PERIOD page 203 carries out a period measurement It is thus suitable for frequencies lower than 1000 Hz In principle it can also measure higher frequencies but this has a significant impact on the...

Page 202: ...ignals use function SAFE_FREQUENCY_OK together with function PERIOD page 203 SmartController CR2500 PDM360 smart CR1071 Function symbol FREQUENCY INIT F CHANNEL TIMEBASE Description FREQUENCY measures...

Page 203: ...cription INIT BOOL TRUE only 1 cycle function initialised FALSE during cyclical processing of the program CHANNEL BYTE Number of the input 0 x value depending on the device TIMEBASE TIME Time base NOT...

Page 204: ...ler CR2500 PDM360 smart CR1071 Function symbol PERIOD INIT C CHANNEL F PERIODS ET Description PERIOD measures the frequency and the cycle period cycle time in s at the indicated channel Maximum input...

Page 205: ...he device PERIODS BYTE Number of periods to be compared NOTE The function may provide wrong values before initialisation Do not evaluate the output before the function has been initialised We urgently...

Page 206: ...the mark to space ratio is indicated in per mill Maximum input frequency data sheet This function measures the frequency and the cycle time of the signal at the selected CHANNEL To calculate all posit...

Page 207: ...of periods to be compared NOTE The function may provide wrong values before initialisation Do not evaluate the output before the function has been initialised We urgently recommend to initialise all r...

Page 208: ...5 SafetyController CR7020 CR7021 CR7032 CR7200 CR7201 CR7232 CR7505 CR7506 SmartController CR2500 PDM360 smart CR1071 Function symbol PHASE INIT C CHANNEL P ET Description PHASE reads a pair of channe...

Page 209: ...BYTE Channel pair 0 or 1 NOTE The function may provide wrong values before initialisation Do not evaluate the output before the function has been initialised We urgently recommend to program an own i...

Page 210: ...functions for the evaluation of encoders The function is designed as up down counter Two frequency inputs form the input pair which is evaluated by means of the function The following table shows the...

Page 211: ...he corresponding direction in the preceding program cycle If the counter stops the direction output in the following program cycle is also reset On input RESOLUTION the resolution of the encoder can b...

Page 212: ...CHANNEL BYTE Number of the input pair 0 3 PRESET_VALUE DINT Preset value of the counter PRESET BOOL TRUE preset value is adopted FALSE counter active RESOLUTION BYTE Factor of the encoder resolution...

Page 213: ...32 PCB controller CS0015 SafetyController CR7020 CR7021 CR7032 CR7200 CR7201 CR7232 CR7505 CR7506 SmartController CR2500 PDM360 smart CR1071 Function symbol FAST_COUNT ENABLE CV INIT CHANNEL MODE_UP_D...

Page 214: ...alised FALSE during cyclical processing of the program CHANNEL BYTE number of the input 0 3 MODE_UP_DOWN BOOL TRUE counter counts downwards FALSE counter counts upwards LOAD BOOL TRUE start value PV b...

Page 215: ...CR7020 CR7021 CR7032 CR7200 CR7201 CR7232 CR7505 CR7506 SmartController CR2500 PDM360 smart CR1070 CR1071 Function symbol SOFTRESET ENABLE Description SOFTRESET leads to a complete reboot of the contr...

Page 216: ...manually via function calls in integrated memories from where they can also be read Depending on the controller the following memories are available EEPROM memory Only for SmartController CabinetCont...

Page 217: ...505 CR7506 SmartController CR2500 PDM360 smart CR1070 CR1071 Function symbol MEMCPY DST SRC LEN Description MEMCPY enables writing and reading different types of data directly in the memory The functi...

Page 218: ...RITE ENABLE DST LEN SRC Description WARNING Danger due to uncontrollable process operations The status of the inputs outputs is frozen during execution of FLASHWRITE Do not execute this function when...

Page 219: ...n the memory 219 Parameters of the function inputs Name Data type Description ENABLE BOOL TRUE function is executed FALSE function is not executed DST INT Relative start address in the memory Memory a...

Page 220: ...oller CR2500 PDM360 smart CR1070 CR1071 Function symbol FLASHREAD ENABLE SRC LEN DST Description FLASHREAD enables reading of different types of data directly from the flash memory The function reads...

Page 221: ...rom the address of SRC to the serial EEPROM The execution of the function takes some time therefore it must be monitored via the function output RESULT If RESULT 1 the input ENABLE must be set to FALS...

Page 222: ...dress of SRC from the serial EEPROM Given that the processing of the function takes some time it must be monitored via the function output RESULT If RESULT 1 the input ENABLE must be set to FALSE agai...

Page 223: ...7232 CR7505 CR7506 SmartController CR2500 Function symbol SET_DEBUG ENABLE DEBUG Description SET_DEBUG handles the DEBUG mode without active test input chapter TEST mode page 38 If the input DEBUG of...

Page 224: ...2 CR0505 ExtendedController CR0200 CR0232 PCB controller CS0015 SafetyController CR7020 CR7021 CR7032 CR7200 CR7201 CR7232 CR7505 CR7506 SmartController CR2500 PDM360 smart CR1070 CR1071 Function symb...

Page 225: ...LD_H 020923 Extended identity CR0020 00 00 01 Operating system Identity CR0020 V2 0 0 041004 Hardware version CR0020 00 00 01 Software version Nozzle in front Application Machine SET_IDENTITY Nozzle i...

Page 226: ...ds the application specific program identification stored in the controller With this function the stored program identification can be read by the application program The following information is ava...

Page 227: ...tion DEVICENAME STRING 31 Hardware name and version as string of max 31 characters e g CR0032 00 00 01 FIRMWARE STRING 31 Name of the runtime system as string of max 31 characters e g CR0032 RELEASE S...

Page 228: ...ion SET_PASSWORD sets a user password for the program and memory upload with the DOWNLOADER If the password is activated reading of the application program or the data memory with the software tool DO...

Page 229: ...More functions in the ecomatmobile controller Data access and data check 229 Parameters of the function inputs Name Data type Description ENABLE BOOL TRUE only 1 cycle ID set FALSE function is not ex...

Page 230: ...unintended changes to data in safety critical applications To do so the function determines a CRC checksum of the indicated data range If the input UPDATE FALSE and data in the memory are changed inad...

Page 231: ...from MW0 LENGTH WORD Length of the monitored data memory in byte UPDATE BOOL TRUE changes to data permissible FALSE changes to data not permitted Parameters of the function outputs Name Data type Des...

Page 232: ...cycle time can vary due to program branchings which depend e g on external events conditional jumps This can have negative effects on certain functions By means of systematic interrupts of the cyclic...

Page 233: ...ngle block which cannot be changed A possible solution would be to keep the cycle time as short as possible This often leads to splitting the application up to several control cycles This however make...

Page 234: ...ected by the interrupt routine Therefore only part of the inputs and outputs is serviced If initialised in the interrupt program the following inputs and outputs will be read or written Inputs digital...

Page 235: ...which the interrupt is triggered READ_INPUTS BOOL TRUE inputs integrated into the routine are read if necessary set inputs to IN_FAST FALSE inputs integrated into the routine are not read WRITE_OUTPU...

Page 236: ...ycle time is decisive for real time monitoring So the PLC is at a disadvantage as compared to customer specific controllers Even a real time operating system does not change this fact when the whole a...

Page 237: ...otherwise the interrupts cannot be read NOTE The uniqueness of the inputs and outputs in the cycle is affected by the interrupt routine Therefore only part of the inputs and outputs is serviced If in...

Page 238: ...s the interrupt 1 rising edge 2 falling edge 3 rising and falling edge READ_INPUTS BOOL TRUE inputs integrated into the routine are read if necessary set inputs to IN_FAST FALSE inputs integrated into...

Page 239: ...ser because it is used for program download and debugging The interface can be freely used if the user sets the system flag bit SERIAL_MODE to TRUE Then however program download and debugging are only...

Page 240: ...he serial interface to the indicated parameters Using the function input ENABLE the function is activated for one cycle The SERIAL functions form the basis for the creation of an application specific...

Page 241: ...cription ENABLE BOOL TRUE only 1 cycle interface is initialised FALSE running operation BAUDRATE BYTE Baud rate permissible values 9 600 19 200 28 800 57 600 preset value data sheet DATABITS BYTE Data...

Page 242: ...e via the serial RS232 interface Using the function input ENABLE the transmission can be enabled or blocked The SERIAL functions form the basis for the creation of an application specific protocol for...

Page 243: ...uffer at each call Then the value of AVAILABLE is decremented by 1 If more than 1000 data bytes are received the buffer overflows and data is lost This is indicated by the bit OVERFLOW The SERIAL func...

Page 244: ...Number of data bytes received 0 no valid data available OVERFLOW BOOL Overflow of the data buffer loss of data Example 3 bytes are received 1st call of SERIAL_RX 1 valid value at output RX AVAILABLE 3...

Page 245: ...r of data bytes stored in the serial receive buffer In contrast to the function SERIAL_RX page 242 the contents of the buffer remain unchanged after calling this function The SERIAL functions form the...

Page 246: ...0032 CR0505 ExtendedController CR0200 CR0232 PCB controller CS0015 SafetyController CR7020 CR7021 CR7032 CR7200 CR7201 CR7232 CR7505 CR7506 SmartController CR2500 PDM360 smart CR1070 CR1071 Function s...

Page 247: ...505 CR7506 SmartController CR2500 PDM360 smart CR1070 CR1071 Function symbol TIMER_READ_US TIME_US Description TIMER_READ_US reads the current system time in s When the supply voltage is applied the c...

Page 248: ...5 More functions in the ecomatmobile controller Processing analogue input values 10 8 Processing analogue input values In this chapter we show you functions which allow you to read and process the val...

Page 249: ...urements at the analogue channels The function provides the current analogue value at the selected analogue channel The measurement and the output value result from the operating mode specified via MO...

Page 250: ...em Manual ecomatmobile SmartController CR2500 V05 More functions in the ecomatmobile controller Processing analogue input values Parameters of the function outputs Name Data type Description OUT WORD...

Page 251: ...ocesses analogue voltages measured on the analogue channels The function returns the current input voltage in mV on the selected analogue channel The measurement refers to the voltage range defined vi...

Page 252: ...URRENT ENABLE ACTUAL_CURRENT INPUT_CHANNEL Description INPUT_CURRENT processes analogue currents measured at the analogue channels The function returns the actual input current in A at the analogue cu...

Page 253: ...ler CR2500 V05 More functions in the ecomatmobile controller Adapting analogue values 253 10 9 Adapting analogue values If the values of analogue inputs or the results of analogue functions must be ad...

Page 254: ...ntroller CR2500 Function symbol NORM X Y XH XL YH YL Description NORM normalises a value within defined limits to a value with new limits The function normalises a value of type WORD within the limits...

Page 255: ...lue range Parameters of the function outputs Name Data type Description Y WORD normalised value Example 1 lower limit value input upper limit value input lower limit value output upper limit value out...

Page 256: ...F hrungsgr e w Reference variable w Stellgr e y Manipulated variable y Figure Principle of controlling The selection of a suitable control device and its optimum setting require exact indication of th...

Page 257: ...t inherent regulation 11 1 3 Controlled system with delay Most controlled systems correspond to series systems of P systems systems with compensation and one or several T1 systems systems with inertia...

Page 258: ...tude at KP KPcritical Then the stability limit has been reached Then the time period Tcritical of the steady oscillation has to be determined Add a differential component only if necessary TV should b...

Page 259: ...controller Functions for controllers 259 11 3 Functions for controllers The section below describes in detail the functions that are provided for set up by software controllers in the ecomatmobile co...

Page 260: ...icController CR0020 CR0032 CR0505 ExtendedController CR0200 CR0232 PCB controller CS0015 SafetyController CR7020 CR7021 CR7032 CR7200 CR7201 CR7232 CR7505 CR7506 SmartController CR2500 Function symbol...

Page 261: ...ons in the ecomatmobile controller Functions for controllers 261 Parameters of the function inputs Name Data type Description X WORD Input value T TIME Time delay dead time Parameters of the function...

Page 262: ...dedController CR0200 CR0232 PCB controller CS0015 SafetyController CR7020 CR7021 CR7032 CR7200 CR7201 CR7232 CR7505 CR7506 SmartController CR2500 Function symbol PT1 X Y T1 Description PT1 handles a c...

Page 263: ...functions in the ecomatmobile controller Functions for controllers 263 Parameters of the function inputs Name Data type Description X INT Input value T1 TIME Delay time time constant Parameters of th...

Page 264: ...able of a PID controller has a proportional integral and differential component The manipulated variable changes first by an amount which depends on the rate of change of the input value D component A...

Page 265: ...tual value XS WORD Desired value XMAX WORD Maximum value of the target value KP BYTE Constant of the proportional component KI BYTE Integral value KD BYTE Proportional component of the differential co...

Page 266: ...ontroller has a proportional integral and differential component The manipulated variable changes first by an amount which depends on the rate of change of the input value D component After the end of...

Page 267: ...eristics y t TV TN KI Xd KP Xd KD Figure Typical step response of a PID controller Parameters of the function inputs Name Data type Description X WORD Actual value XS WORD Desired value XMAX WORD Maxi...

Page 268: ...system large TN Slowly increment KP gradually up to a value at which still definitely no fluctuation will occur Readjust TN if necessary Add differential component only if necessary Select a TV value...

Page 269: ...roller is a controller with PID characteristics The values entered at the function inputs KP and KD are internally divided by 10 So a finer grading can be obtained e g KP 17 which corresponds to 1 7 T...

Page 270: ...value channel 2 XS WORD desired value reference variable XMAX WORD maximum value of the desired value KP BYTE constant of the proportional component 10 TN TIME reset time integral component KD BYTE pr...

Page 271: ...500 V05 Annex Functions for controllers 271 12 Annex Address assignment and I O operating modes 272 System flags 274 Overview of the files and libraries used 275 Additionally to the indications in the...

Page 272: ...utput byte 0 QX0 00 QX0 07 flag byte ERROR_SHORT_Q1Q2 error byte ports 1 2 short circuit QX0 00 QX0 07 flag byte ERROR_BREAK_Q1Q2 error byte ports 1 2 interruption QX0 00 QX0 07 IEC addresses can vary...

Page 273: ...cription chapter PWM signal processing page 161 PWMI description chapter Current control with PWM page 172 FRQ CYL description chapter Counter functions for frequency and period measurement page 200 1...

Page 274: ...al error on input group x ERROR_MEMORY BOOL Memory error ERROR_POWER BOOL Undervoltage overvoltage error ERROR_SHORT_Qx BYTE Short circuit error on output group x ERROR_VBBR BOOL Supply voltage error...

Page 275: ...emory location ifm_CRnnnn_Vxxyyzz CFG ifm_CRnnnn_Vxx CFG PLC configuration per device only 1 device specific file inlcudes IEC and symbolic addresses of the inputs and outputs the flag bytes as well a...

Page 276: ...n up to V01 all other devices up to V04 valid for CRnn32 target version from V02 onwards all other devices from V05 onwards memory location of the files System drive C D program folder ifm electronic...

Page 277: ...fm_Browser_CRnnnn INI CoDeSys browser commands all ecomatmobile controllers all PDM360 monitors ifm_Errors_CRnnnn INI CoDeSys error file all ecomatmobile controllers all PDM360 monitors Target file Fi...

Page 278: ...1070 CR1071 3S_CanDrv LIB CANopen driver PDM360 CR1050 CR1051 CR1060 PDM360 compact CR1052 CR1053 CR1055 CR1056 3S_CANopenDeviceOptTable LIB 3S_CANopenDeviceOptTableEx LIB all ecomatmobile controllers...

Page 279: ...CR7021 CR7200 CR7201 CR7505 CR7506 SmartController CR2500 PDM360 smart CR1070 CR1071 ifm_CRnnnn_J1939_Vxxyyzz LIB J1939 communication functions ClassicController CR0032 ExtendedController CR0232 ifm_P...

Page 280: ...c functions for R360 controllers ClassicController CR0032 ExtendedController CR0232 ifm_SafetyIO_Vxxyyzz LIB safety functions all ecomatmobile SafetyControllers ifm_PDM_Util_Vxxyyzz LIB help functions...

Page 281: ...the French inventor J M Baudot whose code was used for telex machines 1 MBd 1024 x 1024 Bd 1 048 576 Bd Bus Serial data transmission of several participants on the same cable C CAN CAN Controller Are...

Page 282: ...ons GmbH Germany CoDeSys for Automation Alliance associates companies of the automation industry whose hardware devices are all programmed with the widely used IEC 61131 3 development tool CoDeSys Hom...

Page 283: ...s are used intentionally and not any individual systems of the same design It is assumed that systems of the same performance however of different implementation are sensitive or insensitive to differ...

Page 284: ...ate Whether or not the potential is realized can depend on the channel architecture of the system in redundant systems a dangerous hardware failure is less likely to lead to the overall dangerous or f...

Page 285: ...ealthy posture noise emission high temperature or the hazard may appear unexpectedly e g explosion crushing hazard as a consequence of an unintended unexpected start up ejection as a consequence of a...

Page 286: ...product has to warn against readily predictable misuse in his user information Monitoring Safety function which ensures that a protective measure is initiated if the ability of a component or an eleme...

Page 287: ...NMT commands and PDOs can be transferred P PC card PCMCIA card PCMCIA card PCMCIA Personal Computer Memory Card International Association a standard for expansion cards of mobile computers Since the...

Page 288: ...e only NMT commands are transferred Programming language safety related Only the following programming languages shall be used for safety related applications Limited variability language LVL that pro...

Page 289: ...failure of one component the others ensure the task In addition it is tried to separate redundant systems from each other with regard to space Thus the risk that they are affected by a common interfe...

Page 290: ...ne into a safe state in time in the event of a failure of the safety function Safety standard types The safety standards in the field of machines are structured as below Type A standards basic safety...

Page 291: ...afety related input signals are initiated including for example the actuating cam and the roller of the position switch and end at the output of the power control elements including for example the ma...

Page 292: ...PDOs These services are not confirmed by the protocol i e it is not checked whether the message is received Exchange of network variables corresponds to a 1 to n connection 1 transmitter to n receive...

Page 293: ...163 Calculation of the RELOAD value 162 CAN 283 CAN device 83 100 CAN device configuration 101 CAN errors and error handling 51 55 CAN in the ecomatmobile controller 47 CAN interfaces 48 CAN network v...

Page 294: ...stem error 41 Example with function CANx_MASTER_SEND_EMERGENCY 122 Example with function CANx_MASTER_STATUS 127 Example with function CANx_SLAVE_SEND_EMERGENCY 135 Examples NORM_HYDRAULIC 199 Exchange...

Page 295: ...ORM_HYDRAULIC 182 197 Function OCC_TASK 175 182 Function OUTPUT_CURRENT 33 167 169 171 177 182 183 Function OUTPUT_CURRENT_CONTROL 173 182 183 Function PERIOD 30 201 204 Function PERIOD_RATIO 30 206 F...

Page 296: ...otes on devices with monitoring relay 40 Obj object 289 Object directory 289 OBV 289 Operating modes 37 Operating states 35 Operating states and operating system 35 Operating system 289 Operational 28...

Page 297: ...ng system manually 14 Set up programming system via templates 16 Setting control 258 Setting of the node numbers and the baud rate of a CAN device 107 Setting rule for a controller 258 Settings in the...

Page 298: ...ntroduction 178 Topology 47 Transmit emergency messages via the application program 107 UDP 294 Uptime mean 294 Use as digital inputs 201 Use of the CAN interfaces to SAE J1939 48 63 70 145 Use of the...

Reviews: