01-27-2011 04:44 AM
This might be a simple thing to do but I can't make it happen 😞
So I need to make a mac address with colons. At first, the Address is divided in two sections.
First the constant part C87248 and the second part as a running number from 0 to appr. 16000000
The outcome should look like this C8:72:48:00:00:00
The .vi is going to be used in teststand 3.5.
The running number is an input parameter and .vi should return the mac address as a string so that teststand could read it.
These hex conversions in labview drives me crazy. I'm able to convert the address to format
C872 4800 0000 but I can't reformat it the way i want it.
Solved! Go to Solution.
01-27-2011 04:54 AM
01-27-2011 05:10 AM
This should do it, although it's probably not the most efficient way.
MC
01-27-2011 07:01 AM
Thanks ! That works just fine 🙂
01-27-2011 08:33 AM
01-27-2011 09:20 AM - edited 01-27-2011 09:23 AM
And here is yet another solution.
Note: Right click on the Search And Replace function and check Regular Expression.
Edit: Added the 6 constant to length input of number to hex
01-27-2011 09:40 AM
Speed is probably not important for something like this. But out of curiosity I did a comparison of all three techniques above. I ran the algorithms 10M times each.
MaxCrunch 250mS
Omar II 1586mS
SteveChandler 1590mS
Altenbach: <46pS (Only he has not yet posted his version )