en:lib:mdl:mdl-s-ipdevice-010

This translation is older than the original page and might be outdated. See what has changed.

The term device identifies a category of software devices designed to perform more or less complex support and control actions, to solve problems tied to the automation of systems. There are two types of device: internal and external. Internal devices have their codes residing and performed by the firmware of the actual product. External devices have the code residing and executed in the “intelligent” specialist cards that have their own calculation capability. The controller can only manage internal type devices . The list of devices implemented in the firmware depends on the firmware version. This paragraph is designed to illustrate the list and characteristics of the devices available.

Firmware version 10 implements the following devices:

Device nameSampling time
minimum (msec)
Sampling time
maximum (msec)
Execution time (%)
CANOPEN1250100
CALENDAR--0
DATASTORE12090,5
FREQ12504,75
DAC--0
ANINP125014,25
COUNTER312505,94
SERCOM12509,26
MODBUS125032,07
MMIQ211090,5
RECDATA12505,34
QMOS--0

Firmware version 20 implements the following extra devices:

Device nameSampling time
minimum (msec)
Sampling time
maximum (msec)
Execution time (%)
EANPOS125055,94
OOPOS3125027,91
HEAD2112523,75

Firmware version 30 also implements the following devices:

Device nameSampling time
minimum (msec)
Sampling time
maximum (msec)
Execution time (%)
CAMMING3125055,94
JOINT1)125095,01

1) the effective sampling time is double the actual setting
Details of devices
CANOPEN

If the device declaration CANOPEN indicates the zero speed, then it can be set by SW1 dip's 5 and 7. The first slot to address resources that reside in Canopen modules is 4.

DATASTORE

The files processed by the device DATASTORE are all contained in the /DS directoty. If this directory does not exist, it is created automatically. The device DATASTORE can operate both with the MMC/SD card and with the internal NAND memory (not removable). To define which mass memory to operate the priority paramenter is used (0=MMC/SD, 1=NAND). If the application has to access the two supported devices frequently and the physical removal of the MMC/SD card is not required, a special setup can be used for the priority parameter that avoids having to continuously run the memory MOUNT UMOUNT. In pratice, when wanting to change memory, before running the UMOUNT command, set “priority = -1”. This avoids the UMOUNT phase is avoided in the device, making the next MOUNT command to the memory very fast.

An example of QCL code to change device:

  SUB SETMMC
    WAIT NOT Mmc:st_busy
    IF Mmc:st_mount
      Mmc:priority = -1
      UMOUNT Mmc
      WAIT NOT Mmc:st_mount
      CALL CHECK_ERR_WRN
    ENDIF
    Mmc:priority = 0
    MOUNT Mmc
    WAIT Mmc:st_mount
  ENDSUB
 
  SUB SETNAND
    WAIT NOT Mmc:st_busy
    IF Mmc:st_mount
      Mmc:priority = -1
      UMOUNT Mmc
      WAIT NOT Mmc:st_mount
      CALL CHECK_ERR_WRN
    ENDIF
    Mmc:priority = 1
    MOUNT Mmc
    WAIT Mmc:st_mount
    CALL CHECK_ERR_WRN
  ENDSUB

There is a particular setting of the parameters that allows to check the existence of a file in the device. Use the “filenum” parameter set to -1 and with the OPENFILE command the device, instead of opening the file, it searches for the first file in the “/DS/” directory of the selected memory. When it is found, the file name is set by the device in the parameter “filenum” (and its type in the parameter “filetype”). Setting -1 in “filenum” again and running the OPENFILE command, the next file name is found and so on. Every time an OPENFILE operation is run with filenum different to -1, the search loog is closed. When the search has ended and there are no more files present, then the device will set as answer to the command OPENFILE “filenum = -2”. The execution of the command is signalled by the flag st_busy = 0. If the file extension is not HEX or CSV, the file is ignored by the search. If the file name is not compatible with those managed by DATASTORE (numbers 0 to 9999999) then “filenum” will remain set to -1 and a warning is given.

RECDATA

The device can memorise up to 10000 step.

QMOS

The parameter “frwuvalue01” contains the number value of the product serial number.

FREQ

To define the input associated to the device FREQ use the number field provided in the device declaration. The availability of frequency inputs has to be checked with the hardware version of the product. To ricavare the relation between number and terminal pin, use the information contained in the “Address” column given in the terminal tables.

CAMMING3

The parameters related to the sectors (CodeQm, CodeQs…) are not retentive. On startup they always take on the value 0.

  • Last modified: 2019/08/29 17:01