Skip to main content
7-Bedrock
December 16, 2024
Solved

Read 14 bit data from 16 bit register of IO Link master in Kepware

  • December 16, 2024
  • 1 reply
  • 1391 views

I have a sensor connected to IO-Link Master. Reading temperature over Modbus communication. According to IODD file, we can get the temperature by reading only 14 bit of the word(16 bit) leaving 2 LSBs i.e. first 2 bits.
How can it be acheived in Kepware?

Best answer by ntripathi

Greetings @GC_11210517 ,

 

I hope you're doing well.

 

The cause behind this error is that the expression may contain an unknown tag, misspelled keyword, or syntax error.

 

Please follow the below-mentioned steps to address this issue:-

 

1. Verify any tags in the expression exist and are valid. Correct as necessary.
2. Check the expression for misspelled keywords and syntax errors. Correct as necessary.

 

 

1 reply

16-Pearl
December 16, 2024

Hello,

 

You can create a derived tag and try the following expression for only the required 14 bits to see if it works.

 

 

  • Here is the Manual link  of Advanced Tags Plug-In for more help

 

  • Expression: (TAG (Channel1.Device1.Bit1)*(POW(2,0)))+(TAG (Channel1.Device1.Bit2)*(POW(2,1)))+(TAG (Channel1.Device1.Bit3)*(POW(2,2)))+(TAG (Channel1.Device1.Bit4)*(POW(2,3)))+(TAG (Channel1.Device1.Bit5)*(POW(2,4)))+(TAG (Channel1.Device1.Bit6)*(POW(2,5)))+(TAG (Channel1.Device1.Bit7)*(POW(2,6)))+(TAG (Channel1.Device1.Bit8)*(POW(2,7)))+(TAG (Channel1.Device1.Bit9)*(POW(2,8)))+(TAG (Channel1.Device1.Bit10)*(POW(2,9)))+(TAG (Channel1.Device1.Bit11)*(POW(2,10)))+(TAG(Channel1.Device1.Bit12)*(POW(2,11)))+(TAG(Channel1.Device1.Bit13)*(POW(2,12)))+(TAG(Channel1.Device1.Bit14)*(POW(2,13)))+(TAG(Channel1.Device1.Bit15)*(POW(2,14)))+(TAG(Channel1.Device1.Bit16)*(POW(2,15)))
     

     

7-Bedrock
December 17, 2024

(TAG (Channel1.Device1.Bit1)*(POW(2,0))) --> here 'Bit1' configuration giving error
invalid expression: unknown tag or misspelled keyword

ntripathi15-MoonstoneAnswer
15-Moonstone
December 17, 2024

Greetings @GC_11210517 ,

 

I hope you're doing well.

 

The cause behind this error is that the expression may contain an unknown tag, misspelled keyword, or syntax error.

 

Please follow the below-mentioned steps to address this issue:-

 

1. Verify any tags in the expression exist and are valid. Correct as necessary.
2. Check the expression for misspelled keywords and syntax errors. Correct as necessary.