Siemens symbol list

LSNL

Member
Join Date
Oct 2006
Location
Netherlands
Posts
5
Hi,

I want to open a siemens s7 symbol list ( project\YDBs\xxxxx\SYMLIST.DBF ) with a VB6 application. But I receive an error 'Can't decode file'. Has anyone experience opening the symbol list with VB6?
 
You could always export the symbol table as a DIF or Ascii file and manipulate that file using VB, then import it back into Step 7.
It all depends on what you are going to do.

(I tried opening the DBF file using Access but that failed)
 
I Know. But I want to make a VB application to select a S7 project and use the symboltable information to generate code for simulation purposes in VB. I tried other dbf file's in the project and they can be opened without errors.
 
I do not have a clue but like to think out loud. Maybe that DBF is in use is why you can not manipulate it. It may be one of those situations where the process has to be interrupted or halted to use the file.
 
Hmmm, doesn't look like it. I copied several dbf files from a project to my VB dir (all are not read only). all dbf files can be opend execpt the symbol table dbf.....
 
That's also a possibility. It would be nicer if i could open it using ado. but if it doesn't work at all i'll probably do it like that.
I just downloaded dbf viewer 2000 and it opens the dbf without any problems. If I save it with a different name and open it with my vb project it opens with no errors. that a bit odd.....
 
Found it,

You just have to set some bytes to 0. So I made a copy of the dbf and set the bytes to 0, and opend it with ado.

Make sure your copied file does not exceed 8 characters!!

example VB6 code:

Private Sub Command1_Click()
Dim fso As FileSystemObject
Dim iFileNr As Integer
Dim sFileName As String
Dim iNdx As Integer
Set fso = New FileSystemObject
fso.CopyFile "D:\xxxx\DBF\VB_Project\SYMLIST.dbf", _
"D:\xxxx\DBF\VB_Project\SYMLIST1.dbf"

sFileName = "D:\xxxx\DBF\VB_Project\SYMLIST1.dbf"
iFileNr = FreeFile

'open copies dbf file
Open sFileName For Binary As iFileNr

'set byte 13 to 32 to 0
For iNdx = 13 To 32
Put #iFileNr, iNdx, CByte(0)
Next
'close copies dbf file
Close #iFileNr

Set fso = Nothing

'connect ado object to dbf file bestanden => files
Adodc1.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=dBASE-bestanden; Initial Catalog=D:\xxxx\DBF\VB_Project"

Adodc1.CommandType = adCmdTable
Adodc1.RecordSource = "SYMLIST1"
Adodc1.Refresh

'set your datagrid datasource property to adodc1 on your form
DataGrid1.Refresh

End Sub
 

Similar Topics

I have a S7 project originally written in German that I am trying to troubleshoot. Can the symbol table be exported into Excel then translated and...
Replies
5
Views
3,897
How can I find the location of a symbol in my program? I have a huge list of I/Os in symbol table and I want to know that in which FC/FB the...
Replies
1
Views
1,519
Hi I am working with a siemens S7 PLC which was not having comments in the program.There was a similar program with symbols but having some...
Replies
2
Views
3,655
Hi I have inserted a symbol from the standard built in symbol library (looks like the Reichard library to me). I wish to use different colours...
Replies
7
Views
2,873
Hi! I am new to Step5 programming. I am trying to understand the program in a line. I am confused because everywhere DW 20 is used, regardless of...
Replies
6
Views
3,778
Back
Top Bottom