11-23-2012 01:55 AM - edited 11-23-2012 02:17 AM
Hello,
I got problem regarding to modbus register.
Means I have call serial no. Which is given on address 5000 and serial no is 16 bytes and each bytes has high and low bits.
When I call from address 5000 by using Modbus then I can read only first two bytes (4 bits) can you guide me please how can I read my Bytes serial no. Directly by using modbus.
May be I am not good enough in explanation so here I have attaché one diagram in that right hand side in redbox indicate serial no.which I gave.
And LHS it show the register address and 12594 value is decimal may be and then 16 bytes.each bytes has high and low bits.
I want to make Vi by using that I can see my serial no directly on front pannel.
right now i am only able to see 12594 value that i dont want i want serial no.which i have given on RHS side of pic.
Can you please guide me how can I do so...
also i am attaching example vi which i got from NI forum.
Thank you very much in advance............
Solved! Go to Solution.
11-23-2012 04:07 AM
May be problem is solved now i can read the value which i want....
11-28-2012 01:45 AM
Hello,
I want read different bit values from the single location.
Here in attachment I have attached screen shot of my modbus address from where I want to read the values,and also attached my vi which I made but I got one problem that I don't know how to read three different bit from the same location.
I have to read 3 different bit from the register 11 for Digital output 1,2 and 3.i have assigned bit 4 for digital output1 ,5 for digital output 2 and 6 for digital output3.
Will you please guide me .
Thank you very much.
11-28-2012 10:45 AM - edited 11-28-2012 10:47 AM
This is basic boolean math.
Read the byte. If you want to determine the value of a particular bit, then you need to AND it with another value. For bit 0 AND it with 1, for bit 1 AND with 2. ANDing with 128 will give you the value of bit 7 (8th and highest bit). If the result is 0, then that bit is false. If the result is >0, then the bit is true.
Even easier is to take the Number and convert it to a boolean array through the Number to Boolean Array function on the boolean palette. Then you can index out the particular boolean you want from the array.
12-12-2012 01:30 AM
Hi,
I am using modbus communication between PLC and Labview, this communication is very slow. We are using 6-reading blocks & 40-writing blocks connecting serially with a single modbus master block which i have attached with this post.
Can anyone, please suggest me whether the above procedure is correct?
Also suggest me how to speedup the communication between PLC to Labview.