Datablocks in Step7

A

Thread Starter

Andy Hill

I have set up and arry of 2000 rela numbers in a datablock and I want to input real values from and excel spread sheet into table. How do I "paste" these valuses into the datablock my first thought was to export it then re-import it with the data but that functions not available.

Could I use a DB language like Delphi to open the Table on the HDD instead of Step 7.?

Answers on a Postcard Please.
 
D

Daniel Chartier

Hello Andy;
One way of doing what you want is to create a source file from your DBx. In the LAD/... editor, look in the File menu and click on "Generate source"; choose a name (free selection)and the content (you can concatenate any number of program files from your project, then generate. In the Sources folder of Step7 you will find a (file_name).awl file that you can open with any text editor and modify at will. To re-import it into your project, compile the saved file (right-click on the file in the Sources folder.

Hope this helps,
Daniel Chartier
 
D

Donald Pittendrigh

Hi All

Easier way is to open the source file, TYpe ctrl^A and then ctrl^C and then open note pad, give it a ctrl^v, save as a txt file and then open in excel by importing text file with fixed field lengths, it takes a bit of fiddling to get it right but I do it often to generate scada tags with the identical names to the data block names. Exporting back from Excel is done the same way but excel often messes up the file format for you, and I am too stupid to sort this out, so I import the table into word, convert it to text and then copy and paste as described, back into the source file. Sounds like a helluva story, but actually its very quick and easy.

Cheer
Donald Pittendrigh
 
Top