LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the MAC address of a PXI in a dll

Solved!
Go to solution

Hi,

I am looking for a way to get the MAC address of a PXI RT controller. I know that there is a VI to do this, but I am looking for a solution for a dll (C-Code).

I use the "Call library node" to call this dll and want to make sure that it is only used on a specific PXI.

Since the VI provides the functionality, I am wondering if it is also available to be called from C-Code?

 

 

Thank you,

 

Christian

0 Kudos
Message 1 of 22
(4,188 Views)

@ChristianEC wrote:

Hi,

I am looking for a way to get the MAC address of a PXI RT controller. I know that there is a VI to do this, but I am looking for a solution for a dll (C-Code).

I use the "Call library node" to call this dll and want to make sure that it is only used on a specific PXI.

Since the VI provides the functionality, I am wondering if it is also available to be called from C-Code?

 

 

Thank you,

 

Christian


If it is available in LabVIEW it is probably available in CVI, which you could then build into a DLL (if there isn't one available already).

0 Kudos
Message 2 of 22
(4,186 Views)

I already searched the documentation but couldn't find any information about how to read the MAC address from C-Code.

Therefore, I hope that somebody who reads this forum, knows if it is possible or not.

 

Christian

0 Kudos
Message 3 of 22
(4,169 Views)

Are you able to use a labview command then pass it into the dll? (call a dos command for example and interpret the output)

Please remember to accept any solutions and give kudos, Thanks


LV 8.6.1, LV2010,LV2011SP1, FPGA, Win7
0 Kudos
Message 4 of 22
(4,163 Views)

No, unfortunately not. I need to have the functionality completely wrapped in the DLL, so it is not possible to pass the MAC address into the dll.

Additionally, I don't think that dos commands like ipconfig are supported on PXI, or am I wrong?

 

Christian

0 Kudos
Message 5 of 22
(4,158 Views)

Hi Christian,

this is what i found about getting the MAC address with LV:
"get MAC address using .net in LabVIEW" (look at the attached screenshot)

I hope this could help you to implement your code.

Regards,
Matijas

Message 6 of 22
(4,139 Views)

Hi Matijas,

 

this looks really good, I will try to implement this.

Do you know if .net is supported on PXI systems as well, or can it be used on Windows systems only?

 

Thank you,

 

Christian

0 Kudos
Message 7 of 22
(4,133 Views)

I have to admit the way i did it was to write a program in c# that did all my wifi networking then called it from system exec, then process the output.

 

worth remebering the above method tho

Please remember to accept any solutions and give kudos, Thanks


LV 8.6.1, LV2010,LV2011SP1, FPGA, Win7
0 Kudos
Message 8 of 22
(4,127 Views)

@ChristianEC wrote:

[..]Do you know if .net is supported on PXI systems as well, or can it be used on Windows systems only?

[..]


PXI is an industrial standard for personal computers. So it is a pure hardware standard and does not define any software running on it.

So essentially, a PXI controller can run "any" OS, being Windows or LV Realtime as most common.

Are developing for LV(CVI) Realtime? If yes, the .NET component will not work on the system. If the PXI runs Windows, it should run properly if the required .NET-framework is installed.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 9 of 22
(4,112 Views)

Thank you for clarification Norbert.

The PXI runs LV Realtime, so the .net solution will be no option.

Are there any other ways to get the MAC address.

I can't imagine that it should be impossible to get the MAC address from C-Code.

The RT Get Target Information.VI provides this functionality on block diagramm level, so there must be some kind of underlying system call, API etc. But unfortunately, I am not able to find any information about what is done in this VI internally.

 

Thank you,

 

Christian

 
0 Kudos
Message 10 of 22
(4,107 Views)