How to create virtual machine for testing secgem ?

Hi all,

I am trying to create a virtual equipment. It is used to simulate between host-equipment conversation over the secs/gem protocol. I know the basic thing is that connect under TCP/IP protocol. In C# , I can create a connection between the host and the client via Socket/TCPListener. But further, I want to create a virtual equipment. When the host sends an S1F13 request, the virtual equipment will response with S1F14. Assuming the communication dictionary
built-in before. For example, if host send S1F13, equipment will reply S1F14, if host send S1F17, equipment will reply S1F18, so on..

The problem now is that I need to create a virtual equipment and establish connection between the host and the virtual equipment via secs/gem , enable/disable secs/gem, open/close the connection between host-virtual equipment, send command from host and get response from virtual equipment.

If you have any idea, please feel free let me know.
Thanks.

Biểu tượng Cộng đồng đã xác minh
 
I can't comment on the secs/gem protocol specifically, but when developing communication drivers for TCP/IP protocols, you can start both a server and client on your local computer and target the loopback address (127.0.0.1) from your client to test communications.

If you want to test communications to several virtual devices at the same time, you can add additional IP addresses to your network interface and bind each server to a different IP address on your computer. You can do this by going to your Ethernet adapter's properties: Internet Protocol Version 4 (TCP/IPv4)->Properties->Advanced...->Add...(Under IP addresses).

1681139348653.png
 
Hi ,
Yes, that is right. I want to create my program with same functionality , like Ignition Secs/gem. (the function create simulator). How can i do it.? My program by C#. At the beginning, i can create simulator communications between host and client (send/receive messages) . Socket/TCPlistener support this way. (many references from Google). So, i just don't know how to simulate like Ignition Secs/gem function simulator.
Thank for your feedback.
 
Are you asking how to write an entire SECS/GEM simulator using C#? Have you written any code yet? And I have to ask, is this a homework assignment? If not, what is the purpose of this program, as opposed to just using the Ignition SECS/GEM Simulator?
 
Hi jschulze,
Sorry for this one, I just want to think of something. It's not really a homework assignment. Not too complicated and functional like Ignition SECS/GEM. It's just equipment simulation, send/receive conversation between host and virtual machine based on dictionary conversation, which prepare before.
 
Top