Excel to SLC500 how to write values?
Excel to SLC500 how to write values?
(OP)
What is the syntax to write a value back to the plc?
I am currently able to read values from the plc in my Excel sheet using a driver from wonderware (ABKF2) for serial communication. My Topic is ABPLC. Here is the string in my A1 box.
=ABKF2|ABPLC!O1.5
This allows me to view the status of O:1.5
EX: If i want to write a value of 1 to my plc adress O:1.0
What do i have to do?
Thanks
I am currently able to read values from the plc in my Excel sheet using a driver from wonderware (ABKF2) for serial communication. My Topic is ABPLC. Here is the string in my A1 box.
=ABKF2|ABPLC!O1.5
This allows me to view the status of O:1.5
EX: If i want to write a value of 1 to my plc adress O:1.0
What do i have to do?
Thanks





RE: Excel to SLC500 how to write values?
This is the only way to write to PLC.
I can provide you a sample macro, but you have to know how to create it for editing and how to call it from application.
RE: Excel to SLC500 how to write values?
RE: Excel to SLC500 how to write values?
FAQ791-454
Also, you can download the source code to the above FAQ here:
http://www.mrplc.com/dl/index.php?action=view&view=entry&entryid=74
Chris Elston
Automation & Controls Engineer
http://www.mrplc.com
Download Sample PLC Ladder Logic Code
at MrPLC.com
RE: Excel to SLC500 how to write values?
It should work with any other brand DDE driver.
Sub WRITE_TO_PLC (PLC_DEVICE As String, DATA As Long)
CHANNELNUMBER = Application.DDEInitiate(app:="ABKF2", topic:="ABPLC")
Range("DATA_FOR_PLC").Value = DATA
Application.DDEPoke CHANNELNUMBER, PLC_DEVICE, "DATA_FOR_PLC"
Application.DDETerminate CHANNELNUMBER
EndSub
There must be a cell named DATA_FOR PLC elsewhere in the Excel workbook.
Errors processing is not shown here.
RE: Excel to SLC500 how to write values?
And how can i start a macro from a cell value?
RE: Excel to SLC500 how to write values?
The subroutine should be called with two parameters.
The first parameter is the string value indicating the PLC device.
The second parameter is the data to be written.
Use 1/0 to set/reset a bit device.
Example:
Call WRITE_TO_PLC ("O:1/5",1)
I do not understand your second question.
Are you asking how to link this subroutine to the specific cell, or how to start the macro?
RE: Excel to SLC500 how to write values?
RE: Excel to SLC500 how to write values?
You're probably right, I really don't know.
As I mentioned, I use the macro for Mitsubishi and there it's possible to write to any device, including input(!)- it will be forced for one scan.
RE: Excel to SLC500 how to write values?