LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Transfer Excel .cvs File to Allen-Bradley CompactLogix

Solved!
Go to solution

I am a new user to LabView and have not had opportunity to go through any training.

 

I do have an immediate need to take an Excel Spreadsheet (file = DX240_DB.csv) that has an array of 300 rows and 17 columns and send it to an Allen-Bradley CompactLogix L35E array.

(Tagname = DX240_Data_Array, Data Type = 16Bit Integer, Array Size = 300,17)

 

I will be going from a desktop computer (address = 10.10.10.179) via Ethernet to the PLC (10.10.10.180)

 

I was wondering if someone might have an example or a .vi that could be used to accomplish this data transfer.

0 Kudos
Message 1 of 6
(6,303 Views)

Hi J_Dogg,

 

To begin with, the first thing you would need to transfer between a PLC and your cmoputer is a client with OPC protocol enabled if that is what you are using to communicate. You must have NI-OPC Servers and OPC Communications in that case. In addition, you can use either Data Sockets or the DSC module as the programming interface. The DSC module uses Data Sockets as its back end. The examples for the DSC module can be found in Help>>Find Examples>>Toolkits and Modules>>Datalogging and Supervisory Control. Hope this helps. 

 

Ipshita C. 

National Instruments
Applications Engineer
0 Kudos
Message 2 of 6
(6,275 Views)

I have used the Read from Spreadsheet vi to bring the data into LabView. I can see my 256,17 array.

 

I have set up an OPC server and can see the data array in my PLC using Quick Client.

 

Now I need to know how to take the data from the Read from Spreadsheet vi and send it to the PLC via the OPC Server.

 

I do not see any examples of how to use a Data Socket as mentioned in the previous reply.

 

Message Edited by J_Dogg on 07-14-2009 02:09 PM
0 Kudos
Message 3 of 6
(6,254 Views)
Solution
Accepted by topic author J_Dogg

Hi J_Dogg,

 

You should be able to use DatSocket Read and feed the output from Read From Spreadsheet VI to the data terminal of the former. The two concerns here would be how to specify the source connection for the DataSocket Read and what kind of data goes in. Regarding the former, you can put the Excel spreadsheet on a URL and then specify that URL as the source. The kind of data that goes in is variant which means that DataSocket Read will adapt to the kind of data you feed it. Please have a look at the example DS Reader.vi to understand how DataSocket Read is used. go to Help>>Find Examples and search for the above-mentioned VI. Hope this helps!

 

Ipshita C.

National Instruments
Applications Engineer
0 Kudos
Message 4 of 6
(6,238 Views)

I am still struggling with this possible solution.

 

Is it possible to get a block diagram, with .vi's, of what it takes to go from an Excel Spreadsheet to an Allen-Bradley Compactlogix processor?

 

Being a new user, without any training yet, I can get the spreadsheet into into a LabView project and I can use the OPC drivers to read data from the Allen-Bradley PLC, but it is the transfer data from the Read spreadsheet to the download to PLC part that I am trying to get to work.

 

Thank you for your help with this issue.

0 Kudos
Message 5 of 6
(6,126 Views)

Hi J_Dogg,

 

As far as I know there is no direct method for transferring data from a spreadsheet VI to a PLC. I do not know whether your PLC itself has any protocol that supports this but while using LabVIEW you have to put the data in a readable form for the PLC which is either a datasocket or a shared variable. Hope this helps!

 

Ipshita C.

National Instruments
Applications Engineer
0 Kudos
Message 6 of 6
(6,107 Views)