artmierz

q04udeh&qj71c24n-r4

2 posts in this topic

Hello everyone. i use q04udeh cpu and     rs-485 qj71c24n-r4 communication module. I  try to receive information from external device(2000amp power supply). im not a professional plc guy.12.thumb.png.93590f11f0451852078afa020b4

On that moment i get MSG_RECV_String[7],  and store them in separate buffer from K1B108 to K1B120.

i skip one because i do not need that k4B100 , and start from k1B108. I want to show value Voltsx10, but i need some help to do it.

when i change value i see numbers from each separate MOV block function, but i can not convert them to decimal.(or i do not know how to do it). When i try BIN command i have error message 4100.

Thank you for any suggestions.

 

 

11.png

12.png

11.png

11.png

Share this post


Link to post
Share on other sites

If I understand you correctly you get a string value and want to convert that to Decimal.

You should use the VAL command instead of BIN. Bin is for converting a decimal value to String. Val converts a string into a Decimal value.

You can use the LEN instruction to find out the length of the string.

 

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