0

Is it possible to generate a digital signal for a PLC after a .dmp file is updated? I'm currently working with a .exe that generates a shared dump file and updates it with gibberish ASCII upon finding an "endpoint." I'd like to generate some type of signal upon the completion and update of the shared dump file, and import that signal into my PLC programming language (currently CLICK software) and use that signal as an input.

The .dmp file is a "shared memory dump" located in a file folder on the PC itself. The executable writes to the dump file when it finds its "endpoint" signaling the process of the executable has completed. The PC and the PLC would be connected via an Ethernet cable.

Is it possible to write a program that has the ability to "see" the dump file has been updated and send a signal to the PLC? For instance, if the PLC program was written in ladder logic and downloaded to the PLC, and there was no Ethernet connection between the PLC and PC, could a .exe be programmed to send a digital signal that the PLC could recognize as an input?

MacItaly
  • 345
  • 4
  • 16
  • It is not clear where is that file located? On a PLC or on a PC? And what tools do you want to use or already use to update file itself? How PLC and PC are connected? What interface, what protocol? – Sergey Romanov Nov 11 '18 at 08:06
  • Edited to include more details. – MacItaly Nov 12 '18 at 14:57
  • Ok, I see more now but does PLC support for example Modbus TCP? What language did you use to create .exe file? C# or C\C++? For instance you can use something like this (https://sourceforge.net/projects/easymodbustcp/) and send signals to controller. Make EXE master and PLC slave then you will be able to set variable on PLC through Modbus TCP. – Sergey Romanov Nov 13 '18 at 15:51

1 Answers1

0

Depends on the PLC you are connecting to. You can send messages from the PC by wrapping the executable in a script. I would use python. Then send a simple command directly to the PLC.

The difficult part is that the communications is sent across Common Industrial Protocol (CIP) on the Ethernet/IP protocol. If you are a coding wiz, you can hobble some code to send an explicit message to a PLC tag. Otherwise, you will need to find a library. If using python, there should be an OPC or OPC UA library that may work.

If you want to use polling from the PLC to the PC, then using a RESTful server on the PC, again using python, and sending reads from the PLC using a custom MSG instruction may also work.