Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:software:devices:datacell [2016/11/04 17:54] – qem103 | en:software:devices:datacell [2020/07/13 14:53] (current) – qem103 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== DEVICE DATACELL ====== | ||
+ | |||
+ | |||
+ | ====== - Introduction ====== | ||
+ | |||
+ | The DATACELL device, is used to store data in a non-volatile device and is inserted in the family Micro-Qmove when there is no HMI device;\\ | ||
+ | DATACELL has: | ||
+ | * flexible memory management programs; | ||
+ | * a programmable memory access from QCL in writing and reading; | ||
+ | * an insertion of an end-of-program for each program. | ||
+ | |||
+ | |||
+ | ===== - Installation ===== | ||
+ | |||
+ | ==== - DEVICE DECLARATION IN THE CONFIGURATION FILE (.CNF) ==== | ||
+ | |||
+ | In the configuration unit (.CNF), the BUS section must be declared so that you have the hardware resources required for the implementation of the DATACELL device. | ||
+ | |||
+ | <code QCL> | ||
+ | ; | ||
+ | ; Internal device declaration | ||
+ | ; | ||
+ | INTDEVICE | ||
+ | <device name> | ||
+ | </ | ||
+ | |||
+ | where: | ||
+ | |<device name> | ||
+ | |DATACELL|Keyword that identifies the device of recipe management.| | ||
+ | |Tcamp|Time sampling device (1÷250 ms).| | ||
+ | |||
+ | === - Example === | ||
+ | |||
+ | <code QCL> | ||
+ | ; | ||
+ | ; Internal device declaration | ||
+ | ; | ||
+ | INTDEVICE | ||
+ | dcData | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== - Operation ===== | ||
+ | |||
+ | The DATACELL device used to access a memory area equal to 8192 long (32768 bytes) available in the non-volatile memory of the instrument. This memory area is designed to be used as a data container for work programmes or recipes.\\ | ||
+ | The device allows you to arrange access to these data through a table with rows (in numbers equal to a " | ||
+ | |||
+ | The formula that the device uses is:\\ | ||
+ | numprog = 8192 / (numstep * numelem + [1]) | ||
+ | |||
+ | The presence of the number [1] depends on the setting of the bit 0 of the " | ||
+ | If for example, we want to create a table to hold the work programmes with 10 steps each and every step with 4 variables, we can have a total number of programs of 204. If you want to assign to each program a variable to indicate which is the step to end program, the number of programs will be 199.\\ | ||
+ | To write the data into the table that is created you have to use the WRITESTEP command. Before using this command, you must set the " | ||
+ | |||
+ | ==== - Example of writing: ==== | ||
+ | |||
+ | <code QCL> | ||
+ | [...] | ||
+ | dcData: | ||
+ | dcData: | ||
+ | dcData: | ||
+ | dcData: | ||
+ | dcData: | ||
+ | dcData: | ||
+ | dcData: | ||
+ | WRITESTEP dcData | ||
+ | WAIT dcData: | ||
+ | [...] | ||
+ | </ | ||
+ | To read data from memory, use the READSTEP command. Before using the command you have to set the " | ||
+ | |||
+ | ==== - Example of reading: ==== | ||
+ | |||
+ | <code QCL> | ||
+ | [...] | ||
+ | dcData: | ||
+ | dcData: | ||
+ | dcData: | ||
+ | READSTEP dcData | ||
+ | WAIT dcData: | ||
+ | glVar01 = dcData: | ||
+ | glVar02 = dcData: | ||
+ | glVar03 = dcData: | ||
+ | glVar04 = dcData: | ||
+ | [...] | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== - Commands and parameters table ===== | ||
+ | |||
+ | ==== - SYMBOLS USED ==== | ||
+ | |||
+ | The **name** of the parameter, state or command are shows on the left of the table. | ||
+ | |||
+ | **R**\\ | ||
+ | Indicates if the parameter or state is retentive (upon initialization of the device maintains the previously defined), or the state assumes upon initialization of the device.\\ | ||
+ | If the device does not need to initialize the field " | ||
+ | R = Retentive\\ | ||
+ | 0 = Upon initialization of the device the value is forced to zero.\\ | ||
+ | 1 = Upon initialization of the device the value is forced to one.\\ | ||
+ | - = Upon initialization of the device is presented significant value. | ||
+ | |||
+ | **D**\\ | ||
+ | Indicates the **dimensions of the parameter**.\\ | ||
+ | F = Flag\\ | ||
+ | B = Byte\\ | ||
+ | W = Word\\ | ||
+ | L = Long\\ | ||
+ | S = Single Float\\ | ||
+ | |||
+ | === - Conditions === | ||
+ | |||
+ | Are desscribe all the **conditions that must exist is considered correct or because the command is accepted**.\\ In some cases, limit values are specified for the acceptance of the parameter: If there are any values outside the limits set, the data is in any case accepted; therefore appropriate controls of the application must be provided to ensure the proper functioning.\\ To run a command, all the conditions required to be met; otherwise the command is not sent. | ||
+ | |||
+ | **A**\\ | ||
+ | Indicates the access mode.\\ | ||
+ | R = Read.\\ | ||
+ | W = Write.\\ | ||
+ | RW = Read / Write. | ||
+ | |||
+ | ==== - Parameters ==== | ||
+ | |||
+ | ^Name^D^R^A^Conditions^Description^ | ||
+ | |numelem|B|R|RW|-|**Elements number**\\ Indicates the number of elements within a step\\ Valid range: 1 ÷ 6| | ||
+ | |numstep|W|R|RW|-|**Step number**\\ Indicates the number of steps in each program\\ Valid range: 1 ÷ 8192| | ||
+ | |numprog|W|-|R|-|**Program number**\\ Indicates the number of the available programs. The value depends on\\ 1) the total number of long available in program memory,\\ 2) from the value of numelem parameter, | ||
+ | |progin|W|0|RW|-|**Program input**\\ Indicates the program number to be stored with the WRITESTEP command or read with the READSTEP command.| | ||
+ | |stepin|W|0|RW|-|**Step input**\\ Indicates the number of the step to be stored with the WRITESTEP command or read with the READSTEP command.| | ||
+ | |stepout|W|0|RW|-|**Step output**\\ Indicates that the written step has been stored or the step into reading is available. To verify that the command sent (WRITESTEP or READSTEP) was run you should check that stepin = stepout.| | ||
+ | |elema..f|L|0|RW|-|**Elements A..F**\\ Are the values of the step used with READSTEP and WRITESTEP commands| | ||
+ | |elemend|W|0|RW|-|**Elements for end program**\\ If non-zero indicates that the step has end program.| | ||
+ | |readstep|-|-|R|-|**ReadStep**\\ Reads the selected step in stepin| | ||
+ | |writestep|-|-|R|-|**WriteStep**\\ Writes the selected step in stepin| | ||
+ | |prgsetting|B|R|RW|-|**Setting program data-entry**\\ The ZERO bit enables the introduction of program end.\\ When this bit is 1 the number of programs " | ||
+ | |||
+ | ==== - Commands ==== | ||
+ | |||
+ | ^Name^D^R^A^Conditions^Description^ | ||
+ | |readstep|-|-|R|-|**ReadStep**\\ Reads the selected step in stepin| | ||
+ | |writestep|-|-|R|-|**WriteStep**\\ Writes the selected step in stepin| | ||
+ | |||
+ | |||
+ | ===== - Limitations ===== | ||
+ | |||
+ | The write operation via the WRITESTEP command should be done keeping in mind that because of the memory component used (serial Flash Eprom) this operation is costly in terms of time spent. In fact the time used is variable from 512 to 1024 times the sampling time associated with DATACELL device. So this type of memory can be used to contain data that can be changed by the operator with relatively slow times. Definitely not a usable memory to contain data that must be written with a high frequency. In any case the write operation is performed with a background mode and does not affect the performance of the CPU to handle the rest of the device and the application.\\ | ||
+ | For example, if the sampling time associated with the device is 6 ms, the time to perform a write to device can range from approximately from 3 to 6 seconds. Stepout parameter becomes equal to stepin after this time.\\ | ||
+ | Also the type of memory used guarantees a number of Scriptures equal to 100000. Even so you should avoid writing programs which they write continuously on memory using the WRITESTEP command. | ||
+ | |||