Excel to PLC question (String?) Studio5000

Just In Time

Member
Join Date
Aug 2019
Location
Wisconsin
Posts
1
I am trying to get some information from an Excel spreadsheet into my PLC
(Allen Bradley 1769-L16ER -BB1B) (Studio5000)

I have an Excel file that is updated on our server every hour. I want to pull the
certain columns from that Excel file every hour. (part number, order quantity, ID number) The "part number" and "ID number" have letters in them.
(ie: A12345B and SIX1234567).

I have seen the DDE/OPC with RSLinx connection send Real numbers and Integers.
Is there an easy way to send my "Part Number" and "ID numbers" that contain letters.

Thanks in advance for your time.
 
Open RSLinx, go to help/search and type excel. There are some examples that might help. The last time I needed to do this was years ago but this helped me a lot.
 
Welcome to the forum!

The DDE/OPC process is the same no matter the data type. It's been a while since I played with this, but from memory it'll play nice with data types to the extent that it's reasonably possible. For example, I could send a value of 1 to the PLC, and it would work out what to do with it based on the type of the tag in the PLC.
If the target tag was a bool, it would set the bool to true
If it was an integer, it would give it a value of 1
If the tag was a real, it'd give it the value 1.0
If the tag was a string, the resulting string would be "1"
So, long and short of it, I'd say just give it a try and configure the PLC tags as strings. It'll likely just work!
 
Sub Block_Write_String()

'open dde link: testsol=DDE Topic

RSIchan = DDEInitiate("RSLinx", "Rio_Testing")

'write data thru channel

DDEPoke RSIchan, "DDE_TestTag", Range("[RSLINXXL.XLS]DDE_Sheet!C7")

'close dde link

DDETerminate (RSIchan)

End Sub

Create this macro in Excel and Call it how you wish. This is from RSLinx Help but i modified it for a string.
 

Similar Topics

Hello All, I'm looking for an very simple cost effective OPC application software / any other solution for very simple reporting application. PLC...
Replies
1
Views
1,095
Is it possible to pull information from a specific cell in an excel spreadsheet and use it in a program? I am wanting to display a time amount for...
Replies
4
Views
1,166
Good morning. I originally posted about this topic on April 4th and ran into an issue with the IT department and their rules but have since found...
Replies
2
Views
1,653
Hello Everyone. I am getting ready to start trying to implement a set up to allow Excel to read/write to various machine PLCs. I asked the IT...
Replies
4
Views
2,187
Dear Members; I make a date and time stamp by using GSV and SSV instructions. The DINT array with 7 elements stores those values. Now I want to...
Replies
5
Views
1,516
Back
Top Bottom