Yusheng

GX Works3 / GT Designer3 Data Memory Cell to Hexadecimal

8 posts in this topic

How do I convert the values in my data memory cell to hexadecimal?
Eg. D0500 stores 12.34 in the form of a real number, how do I convert this to hexadecimal?

Share this post


Link to post
Share on other sites

DEC and Hex are just interpretations of the Data.
So for your numerical display on your GOT just choose format HEX.

Your Datatype should be the type as it is in the PLC

 

Edited by Gambit
1 person likes this

Share this post


Link to post
Share on other sites
14 hours ago, Gambit said:

DEC and Hex are just interpretations of the Data.
So for your numerical display on your GOT just choose format HEX.

Your Datatype should be the type as it is in the PLC

 

Sorry, I'm but I'm trying to send the data through socket communication to a PC in a HEX format.
Eg. instead of manually entering H5449, I would like to convert D500 into the HEX format.

Hexadecimal.png

Edited by Yusheng

Share this post


Link to post
Share on other sites

@Yusheng as @Gambit said hexadecimal and decimal are just numerical format they are same value as 000Ah = 10 but I understand your condition for monitor value as hexadecimal you should add D303 to watch window that can change display style to HEX. By go to Device/Buffer Memory Batch Monitor then select address then double click in value to add to watch window after that change display format from Decimal to Hexadecimal.

 

 

GXWorks3_Display_01.jpg

Edited by Wasan
1 person likes this

Share this post


Link to post
Share on other sites

Oh, I now understand what you guys were trying to say.
I now realize that the issue is that the actual result is different from my calculated result.


Conversion.png.53187275d8242760ed63ccae9

Figure 1 Actual result
5dfc65fd667a6_Desiredoutcome.PNG.ce6eaf0

Figure 2 Desired result

Do you guys know why there is a difference between the conversions?
When I did the conversion using EXIT  I didn't have any issues.


Exit.png.feb8dbedebda810a1e8b367a4a601ae

Figure 3 Exit (1)
Exit(2).png.646dba6c56b77b5c3fe7fcdee0c4
Figure 4 Exit (2)

 

 

 

Edited by Yusheng

Share this post


Link to post
Share on other sites

As you are using GX works 3. you bare using an FX5 or Q-R. why not take a look at  pre-defined protocol support which will make it this socket comm much easier.

1 person likes this

Share this post


Link to post
Share on other sites
Just now, Gambit said:

As you are using GX works 3. you bare using an FX5 or Q-R. why not take a look at  pre-defined protocol support which will make it this socket comm much easier.

Yes I'm using GX Works 3, I'm using a FX5U. 
I'm new to this, I doing this with guidance from the Mitsubishi Manual.
What pre-defined protocol support are you referring to?

Share this post


Link to post
Share on other sites

take a look in you e-manual viewer for some more info. But basically in you can define all the data strings you want to send and what the answers look like
From the program all you do is give a command to send string 1 or 5 etc.
Of course parts of the data strings can be data variables so they are ease to change in the program.

there are also some already defined. look under Tools -> pre defined protocol support function

1 person likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now