Jump to content
MarkCG

Profibus communication solutions

Recommended Posts

Hi all, I would like to communicate to PROFIBUS DP device with a CompactRIO 9035. I did some research and I am not happy about my options. The cRIO module to talk to it is $1500 which seems outrageously expensive for what I want to do, which is talk to a single device at a 9600 baud. It also looks like you need to use it in FPGA mode, which will force me to have to start compiling bitfiles for my nice scan engine only project.

It does look like PROFIBUS DP uses an RS-485 physical layer which is good. Theoretically I could just communicate to the device with my built in RS-485 port. However, I am not finding any PROFIBUS libraries available for download that work with a generic serial port. I believe the NI-PROFINET driver is tightly integrated to the cRIO profinet module. I am also not jazzed about implementing a PROFIBUS protocol from scratch.

Does anyone have suggestions on good 3rd party adaptors or libraries that would allow me to communicate to this PROFIBUS device with a minimum of programming?

Share this post


Link to post
Share on other sites

There is a reason the NI interfaces are so expensive. You need to be a member of the Profibus International group to receive all the necessary information and be allowed to sell products which claim to be Profibus compatible. And that costs a yearly fee.

While the hardware is indeed based on an RS-485 physical layer there are specific provisions in the master hardware that must guarantee certain things like proper failure handling and correct protocol timing. There have been two Open Source projects that tried to implement a Profibus master implementation. One is the pbmaster project which seems to have completely disappeared from the net and was a Linux based driver library to run with cheap RS-232 to 485 converter interfaces or specific serial controller interface chips. I suppose with enough effort there is a chance that one might be able to get this to work on a NI Linux based cRIO, but it won't be trivial. The main part of this project was a kernel device driver with a hardware specific component that did directly interface to the serial port chip. To get this to interface to a normal RS-485 interface on the cRIO (either as a C module or through the built in RS-485 interface that some higher end cRIOs have, would require some tinkering with the C sources for sure.

The other project is ProfiM on sourceforge which seems to have been more or less abandoned since 2004 with the exception of an update in 2009 which added a win2k/xp device driver. This project is however very Windows specific and there is no chance to adapt this to a cRIO without more or less a complete rewrite of the software.

Unfortunately this is about as far as it seems to go for cheap Profibus support. While the binary protocol for the Profibus is actually documented and you can download the specs for it, or study the source code of these two projects to get an idea, the Profibus protocol timing is critical enough that it will be difficult to simulate with a purely user space based implementation such as using VISA to interface to a standard interface. Certain aspects of the protocol almost certainly need to be implemented in the kernel space to work reliably enough, or another alternative would be to implement the Profibus protocol on the FPGA in the cRIO, but that is also a major development effort.

Edited by rolfk

Share this post


Link to post
Share on other sites

Thank you Rolf! As always you provide great information. Sounds like all those options will cost far more in development time than buying the hardware. I'll just have to get the Profibus module then. 

Share this post


Link to post
Share on other sites

I'm afraid your conclusion is very true, especially if you only plan to build this one system. It would be probably a different situation if you had to build a few dozen, but that is not how this usually works. ;)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.