Convert Machine ID to numbers?
Michael Carlyle 7 years ago in IQANdesign • updated by Lars Bolduc 1 year ago • 7
Is there an easy way to convert the machine ID (which I believe is a text variable) into numbers (each character or the whole number woudl work) as we use this as machine serial # and need to change parameters based on certain digits.
Customer support service by UserEcho
No, there is no string conversion function available in the existing versions. It is one function I hope we could introduce in a future version, it would be quite useful.
One workaround I have suggested for a similar usage in another application was to also use an Integer Parameter and set that to the same value as the machine ID (assuming that the machine ID only contains digits).
Similarly, I'd like to convert module serial number (text value type) into an integer or real value type to perform math calculations with the digits of the serial number. Has there been any updates regarding string handling functions?
See also https://forum.iqan.se/en/communities/1/topics/1013-string-functions
I found a way to convert a short texte into hexa.
It's working with 2 calculators.
Our calculators communicate by J1939 way, so I'm using a "J1939 text out" to send the Machine ID to the second calculator.
On this second calculator I'm receving a Hexa message corresponding to the ASCII table.
Now I could use it to send my message to an external component by CANopen, or convert it into numbers.
You have an uniq message if the texte is max 8 caracters (be carrefull to hiden space).
If the text is more than 8 caracters, the message is split in several messages, and the Byte 1 is the index order of the frames :
I didn't found how to make it working with only One calculator.
Maybe someone will have a trick to do it ?
Hope this will help !
I run into the same issue. I would like to convert 'Project Version' into a number so I can send it via J1939 to our telematics system. I cannot.
I read somewhere that you could connect together two canBUS of one master.
I think you can do the same I explain before with only one calculator.
Yes I'm sure you could. I have implemented your solution on a multi-master system, but of course would be nice to have a built in function.