C# sample code

Hi guys, I’m new to velbus but I have already worked with several “terrain bus” technologies (AS-i, Bechkhoff), I’m mostly developing in C# (within Unity for projects requiring a visual user interface, or directly in Visual Studio for console apps) and have done a lot of C/C++/Java in the past.

I am seeking to integrate Velbus in my catalog of solutions. For simple electronic I/O I usually rely on Arduino or Phidget boards, but I’d like to go a step further and be able to enjoy the power of Velbus.

Would anyone have some C# sample code that he is willing to share to help me get started? I’d like to read/write simple digital inputs/outputs on the modules present on the bus, using a VMBRSUSB module connected to my windows PC via USB.

I found a “VelbusLib” .net project on the web (from a link in one of the posts on this forum) but it is 10 years old so I guess there may have been changes in the protocols since then…

Any help/tip/words of sympathy will be most appreciated! :wink:

Cheers,

Xavier

I don’t know if there is a C# framework for Velbus integration.

I have written my own perl-based velbus code. It started with some perl code I found, but I wrote most code from scratch, step by step.

The protocol files are very handy but sometimes difficult to understand. You can find them here:

My software:

I hope this helps.

Stef

Hello Stef! Many thanks for your reply!

In the meantime I have found an old C# project on the forum, “velbuslib”. Although it is 12 years old it still works perfectly, as far as I tested it. I love stable technology… :slight_smile:

http://www.velleman.eu/downloads/files/downloads/velbuslib.zip

I am not familiar with Perl but I keep your project close by in case I need to understand some subtleties.

Met vriendelijke groeten,

Xavier