From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

How to simulate a profibus slave

I am developing a system to test a system that includes software running on a PC, a S7 PLC, and several sensors. I am using a cRIO to simulate the digital and analog I/O to the PLC and OPC for the computer. That part is working great. The next step is to simulate an Endress+Hauser PROMASS 83 DP which is a profibus slave to the PLC. My first go at this was to use the cRIO PB module from Comsoft. But, correct me if I'm wrong, it seems you have to import the module's gsd to the PLC programming to get it working, which doesn't fit one of the constraints I have to work under, which is I can't make any changes to the system I'm testing to accommodate the simulator.

 

So basically, I need to be able to communicate with the PLC over Profibus in a way that it thinks I am the Promass 83. Is this possible? If so, how might I go about doing it?
0 Kudos
Message 1 of 8
(16,486 Views)

hbcnb,

 

If you were using the Comsoft module as the master you would need to import the gsd for whatever device you are having it communicate with.  Since you are talking about doing the opposite, and having the Comsoft module be the slave, whether or not you need to load a gsd file to your PLC should depend on how your PLC is programmed.  If it is programmed in such a way that it will be able to talk with the Comsoft module without needed the gsd file, you may be in luck.  As far as emulating the Promass 83, I am not familiar with that device, but if it handles inputs and output the same way the Comsoft device does, then you should be able to write a program in LabVIEW that would mimic the behavior of the Promass 83.  To do this, you would need to know how the Promass 83 responds to any inputs you may be sending it.

 

Eric K

Applications Engineer

National Instruments

0 Kudos
Message 2 of 8
(16,464 Views)

Eric:

 

In what way would the PLC have to be programmed to not need the gsd file? It was programmed by importing the gsd files for the two profibus slaves it communicates with.

 

The answer I am getting from comsoft is that the module has a unique ID  which cannot be changed. So if it's this ID that the PLC looks for to communicate over profibus, I'm out of luck it seems. Is this the case, or does that depend on how it's programmed as well?

0 Kudos
Message 3 of 8
(16,457 Views)

hbcnb,

 

To answer your first question, you would need to match exactly the behavior of the device you are trying to emulate, and then use that device's gsd file.

 

In a response to your second point, I believe you are correct and that this ID cannot be changed.  With that limitation you very well may be out of luck since you cannot emulate perfectly the device that you are trying to simulate.  To get this working you would need to change some things in the PLC as well, which sounds like it defeats the purpose of this application.

 

Eric K

Applications Engineering

National Instruments

0 Kudos
Message 4 of 8
(16,442 Views)
Are there any Profibus products out there that I could use with Labview to accomplish this? The Profibus device I'm trying to emulate is programmed into the PLC by importing its gsd file, then reading from it as if it were a register.
0 Kudos
Message 5 of 8
(16,292 Views)

hbcnb,

 

Unfortunately I am not aware of a card with this capability that can work with LabVIEW at this time.

 

 

Eric K

Applications Engineering

National Instruments

0 Kudos
Message 6 of 8
(16,272 Views)
I solved this problem a few months back. I used this PCI card made by Softing. Basically, I just installed the drivers, then took the provided example for a profibus slave (in VB6) and converted it into a dll that I could call from labview. From that point, I just need to initialize the board with the address and ident number expected by the PLC, and the board will automatically accept the configuration sent by the PLC. From that point it's just a matter of reading the inputs and writing to the outputs. Other than one initial problem, the drivers on the website were out of date and weren't quite compatible with the device I was trying to emulate, the board has worked out quite well and was relatively simple to develop. Their tech support was also very helpful. I definitely recommend this board if anyone is looking to solve a similar problem.
0 Kudos
Message 7 of 8
(14,640 Views)

hello,

If you dont' mind, can you please share some detailed steps ? I know this has been long time but I am stuck with driver steps and manufacturer tech support is not that useful.

Thanks,

Vijay

0 Kudos
Message 8 of 8
(5,899 Views)