[Beckhoff] Declaration of structure to address

Bridelance

Member
Join Date
Aug 2011
Location
Belgium
Posts
11
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?
 
Isn't it better to store data to the novram than on the internal memory?
Somebody once told me that writing data to the internal memory over and over again will damage the internal memory. So i was thinking that it would be better to save it to the novram (which is replacable, right?)
 
Well, it's to easy to mention it :p

but if somebody wants to know, an example:

"StructureVariable AT %MB200 :structureType; "
and make sure that you reserve enough space after the address (so if the structure is 100 bytes big, the next free adress is MB300)



I have another question about the FB_WriteFile function: is the writing of the data done in an background proces? Because my taskcycle is set to 100ms, but the timeout timer of this writefile functions is set to 5 seconds. So could it be afraid that it could take upto 5 seconds between two executions of my program when i'm writing data to a file?

(to make it clear: the FB_WriteFile function is contained in the 100ms but is only executed when the user wants to save the data)
 
Last edited:

Similar Topics

Hi everyone, This is my first time posting, so please forgive any omissions or mistakes. I am attempting to control the velocity of a stepper...
Replies
18
Views
921
Hello sameone have Beckhoff PLC Siemens Sinamics V90 configuration example?
Replies
0
Views
91
hello, I am using Beckhoff with TwinCAT3 and when I change or add some new hardware or for any reason, there is a mismatch in the real hardware vs...
Replies
1
Views
119
I have a Beckhoff CX7000 IPC with some digital I/O built-in and I additionally need two analog inputs 0-10V. Can I install both Ethernet terminals...
Replies
4
Views
200
Hello, We are currently working on a project that involves connecting a linear potentiometer to our Beckhoff PLC. After researching, we...
Replies
2
Views
184
Back
Top Bottom