PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Using PXI-Profibus card from a C# application

Hi All,

I'm looking to information on how to use a PXI-Profibus card from a C# application.

The information I have so far seems to cover the use of the card from labview, and configuration using the Comsoft app.

 

From what I've gathered so far, I will need the Comsoft app to configure each Profibus card to be a particular slave in the PXI rack.  But from an application/programming level, I have not found any information on how to actually send and receive data.  I'm assuming that the C# application will run at the OSI Layer 7 and have to build some form of a PDU and then shove the PDU in to some buffer to send out.  On the flip side, the application will either have to poll the Rx buffer or be triggered when data arrives.

 

I have other questions, but don't want to flood this post quite yet.

 

Thanks in advance for any insight.

 

0 Kudos
Message 1 of 4
(3,676 Views)

Hello,

 

What development environment are you trying to use?

 

The Comsoft driver just calls VISA configurations. 

 

If you have access to LabVIEW, the best way to use C# on this card would be to create a wrapper around some LabVIEW code and then call it from C#. Otherwise, you would need to be using VISA commands in C# to recreate what LabVIEW is doing in the background.

 

Eric

Applications Engineer

0 Kudos
Message 2 of 4
(3,618 Views)

Hi Eric,

 

Thanks for the info.  I had a feeling that VISA would be what was needed.

 

I don't have access to LabView and the plan for now is to use Visual Studio and code up the application that will run on the PXI controller using C#.  I'm working on developing a simulation environment and part of the hardware setup includes almost 2 PXI chassis (18 slots) populated with the profibus cards as there a lot of slaves in the system that needs to be simulated.

 

The ideal implementation would be to configure the cards on the fly based on data from a database since our simulation system has to be configured a little differently depending on the version of the end system we are trying to simulate.

 

I've read through the VISA programming manual as well as the ComSoft guide and it seems like the Profibus card would be accessed as a INSTR resource.  If ComSoft uses VISA to interact with the Profibus card, is there any information about the register/buffer memory mapping for card.  For example, what register needs to be configured to set the slave address?  Looking at the list of operations for a INSTR resource, it looks like all that is needed is to read/write from a buffer or write to a register for config purposes (this is a very simplistic description) as well as some other operations.

 

Is my understanding so far on the right track?

 

Omar

0 Kudos
Message 3 of 4
(3,615 Views)

I believe you are on the right track here. But I am not exactly an expert on this. If I were you, I would post this under Industrial Communications instead of PXI. I believe you will be able to get better support there, since our Profibus Team monitors that forum.

 

Eric

Applications Engineer

0 Kudos
Message 4 of 4
(3,605 Views)