decimal to hex in intouch

ungaro

Member
Join Date
May 2005
Location
Lokeren
Posts
72
Hi,

does anyone know if its possible to convert from decimal to hex in intouch? I want two value displays where you enter a decimal value in the left and you get the hex value in the right display.

thanks
 
ungaro said:
Hi,

does anyone know if its possible to convert from decimal to hex in intouch? I want two value displays where you enter a decimal value in the left and you get the hex value in the right display.

thanks

It can be done, you'd just have to write the script to do it.
 
So there is no other way than scripting? Can anyone show me the way since i don't have experience in scripts. Is this a language from wonderware or an other language (vba, c) . Anyone has a link to a manual or tutorial about intouch scripting. Apreciate the help.
 
The wonderware manual should be on the installation CD's. It's their own proprietary scripting language.
 
I was just looking for something similar within InTouch and found this in the manual

StringFromIntg() Function
In a script, you can convert an integer value to a string value by using the StringFromIntg() function.

This function returns the string value of an integer value and performs a base conversion at the same time. This can be used, for example, to show text together with integer values or for converting integer values to hexadecimal numbers.

Syntax
result = StringFromIntg (number, base)

Parameters
number

A literal integer value, integer tagname, or integer expression.

base

The base of the conversion. This is used for converting the value to a different base, such as binary (2), decimal (10) or hexadecimal (16). A literal integer value, integer tagname, or integer expression.

Example(s)
StringFromIntg(26,2) returns “11010” (binary.

StringFromIntg(26,8) returns “32”—because
(base 8: 26 = 3*8 + 2)

StringFromIntg(26,10) returns “26” (decimal).

StringFromIntg(26,16) returns “1A” (hexadecimal).

Hope this helps
 

Similar Topics

I am using a Micro 850E PLC (the new one with implicit messaging capability) to drive a Kinetix 5100 servo drive. The error code number on the...
Replies
7
Views
1,712
I am trying to convert hex values to decimal. I am reading in values from 232ASC module. They come in on ___:4:I: Data[0] & ___:4:I: Data[1]...
Replies
8
Views
3,376
Hey All, i have been fortunate enough to play around with an Applied Motion Products Servo Drive SV200 with 100 watt/ 24vdc congif. I managed...
Replies
2
Views
1,881
Hi I'm using Mitsubishi FX5U with a GOT HMI. I need to enter values on HMI in decimal format then convert to HEX for use on a Modbus RTU link...
Replies
1
Views
3,080
Hi all, great forum I'm learning all the time on here. I'm having a problem with a g308 in that I can read the data in hex, but when I try to...
Replies
0
Views
2,225
Back
Top Bottom