Bridelance
Member
I have made a program for controlling the climate inside greenhouses. Because i have to control 4 seperate greenhouses, the program would be 4 times the same. So i have written the program once and let it run 4 times with different parameters.
These parameters are stored in a structure. So i start with giving the first structure to the program, the program uses the input data from in the structure and write the output to the same structure. After the first structure, comes the second one (for the second greenhouse), followed by the third and the fourth.
(I hope you get the picture)
This all works well, but i have forgotten to provide an easy way to backup the data (from inside the structures) in case of a power failure. I'm using a Beckhoff system on Windows CE, so i think i will have to write the data manual to the novram of the internal memory of the plc. Right?
My first question: is every PLC of beckhoff supplied with NOVRAM memory, or do you have to install a compact card? (i'm using a CP6607)
I have scanned my PLC in the system manager but no NOVRAM was found. So i assume that i don't have that.
Now i have written a program that saves the global variables to the internal memory. Every variable that is declared at a specific address is being saved.
For example:
" Variable1 AT *MB10 : BYTE; "
will be stored.
But how do i assign a structure to an address? The structure is 150 bytes big.
(I'm using the function FB_FileWrite to save the data to the memory)
Could somebody please help me?
These parameters are stored in a structure. So i start with giving the first structure to the program, the program uses the input data from in the structure and write the output to the same structure. After the first structure, comes the second one (for the second greenhouse), followed by the third and the fourth.
(I hope you get the picture)
This all works well, but i have forgotten to provide an easy way to backup the data (from inside the structures) in case of a power failure. I'm using a Beckhoff system on Windows CE, so i think i will have to write the data manual to the novram of the internal memory of the plc. Right?
My first question: is every PLC of beckhoff supplied with NOVRAM memory, or do you have to install a compact card? (i'm using a CP6607)
I have scanned my PLC in the system manager but no NOVRAM was found. So i assume that i don't have that.
Now i have written a program that saves the global variables to the internal memory. Every variable that is declared at a specific address is being saved.
For example:
" Variable1 AT *MB10 : BYTE; "
will be stored.
But how do i assign a structure to an address? The structure is 150 bytes big.
(I'm using the function FB_FileWrite to save the data to the memory)
Could somebody please help me?