10-15-2012 12:36 PM
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
Solved! Go to Solution.
10-15-2012 12:53 PM
@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).
10-16-2012 01:00 AM
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
10-16-2012 02:15 AM
Are you able to use a labview command then pass it into the dll? (call a dos command for example and interpret the output)
10-16-2012 03:21 AM
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
10-17-2012 03:53 AM
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
10-17-2012 04:09 AM
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
10-17-2012 04:13 AM
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
10-17-2012 04:42 AM
@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
10-17-2012 05:06 AM
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