Siemens Read Text File

JasonWade

Member
Join Date
Oct 2005
Location
Preston
Posts
160
I have to read a text file from a USB stick somehow extract the relevant data into a PLC.

The system is based around a 840DSL NCU730.3 and a MP277.

The NCU/PLC has USB ports that are described in the manual as for 'service use only' so I guess I can disregard them, which is a pity as I would have preferred to write PLC code to read the file.

So I think I'm left with the MP277 USB ports and reading the file with a HMI script, which I'm less familiar with.

Am I looking in the right direction? Will it be possible to read the file and extract the data into tags? Also is it possible to write a new file to the USB after the data is edited?

Any help would be appreciated, even if it's to tell me I'm going the wrong way.

Cheers
 
Last edited:
It is possible both to read and write text files from an MP277 using script

Here is a simple example that opens and reads a textfile

Code:
Dim fso,f,temp
Set fso = CreateObject("FileCtl.FileSystem")
Set f = CreateObject("FileCtl.File")

'open text file
f.open "\Flash\MyTxt.txt",1,1 'fsModeInput,fsAccessReadWrite 
Do
temp = f.LineInputString 'read out line by line

'Loop until end of file
Loop While f.EOF = False

f.Close 'close the text file
Set f = Nothing
Set fso = Nothing
 

Similar Topics

Dear Experts, Please, kindly guide me through how to read data from ABB PLC to S7-1200 Siemens PLC. I want to use Siemens S7-1200 PLC to read data...
Replies
1
Views
443
Hello guys, Im using a siemens with WINCC in a computer and need to import to tag´s data fom a specific row in a SCV file, i have a working...
Replies
15
Views
1,660
Hi all, I have an issue and I don't know how to proceed with it. So my problem is... I have several UDP connections. And all communication with...
Replies
20
Views
4,302
Hi, is it possible to read the name of the steps in an S7 Graph sequencer? In the parameterinterface there is, for example the parameter #S_NO...
Replies
21
Views
7,162
Hi i have Beckhoff (CX5020-0120-M310) (profibus master) with TC3.1 and want communicate with Siemens Profibus ET 200S (IM151) DPV1. All modules...
Replies
1
Views
1,687
Back
Top Bottom