chrisb4748

Data Conversion

2 posts in this topic

Hey,

Using a Q03UDV PLC. I've got my data coming over from a Cognex camera via Modbus.

When it comes to putting 2 words together to make one double word and converting it to a string I just get the HEX result and not the number which I really want.

Really "Cognex_DollyNumber" should be 3007 not 37303033.

Would anyone have any advice on this for me?

Thanks

Cognex.PNG.9493d22be765499123bffe00d09155d0b91bef20f9_Cognex1.PNG.5c1d86a4d830975d0b924239d32_Cognex2.PNG.00321c2918af19

Share this post


Link to post
Share on other sites

The cognex_dollynumber is a string format. The values are already strings  12339 = H3033 = ASCII 30

 or do you want 3007 as decimal number in a register in that case you can use HABIN to convert the two registers to one decimal nr. 
 

 

 

 

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