LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus conversion question

Solved!
Go to solution

I am attempting TCP modbus communication with a Hach Particle Counter. 

 

Using the Modbus Master by Plasmionique Inc., I have been able to query the device and have particle count data returned.  

 

The problem I am having is that the data returned doesn't quite match the data displayed on the device.  The larger the count number, the further off the modbus data seems to be.  

 

There are 2, 2 byte memory registers for each particle size count return.  Six different sizes.  In my screenshot all the counts are low enough that only 1 register is needed for count.  

 

Unfortunately I could only do a limited number of unfiltered "pulls" on the particle counter, but in each case the data returned was similar.  Low counts were close or exactly as displayed.  But higher counts seemed to get further away from what was displayed.  

 

I have looked at a few different ways of casting the data, or rotating the array output.  

 

I have also flattened to a string and tried both large and small endian byte order.  So far, anything I've tried only seems to be further off than what I'm already getting.  

Particle Count 01.PNG

I don't have confirmation from the manufacturer yet, but it is possible that there may be some difference between what is displayed and what is in the memory registers, perhaps due to averaging or something.    

 

I think I must have the conversion correct....but I'm not sure.  I'm looking for thoughts on what I might be missing here.  

---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 1 of 3
(2,719 Views)
Solution
Accepted by topic author pallen

The counts that you are retrieving are the totals. The counts displayed is the difference from the last value. If you look at the counts that you retrieved, 2 is the lowest count, followed by 7. The data displayed is 2 for the 10.0 um value and 5 for the 5.0 um value. The values in your array are 2 and 7 where 7 - 2 = 5. Let's look at the next value in the array and the display. In the array you have 19 and the display for 3.0 um is 12. 19 - 7 = 12. This pattern continues through all of your values.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 2 of 3
(2,713 Views)

Thanks Mark! 

 

I could see there was a pattern, and that the particle counter was in "differential mode", but I didn't have the pieces together.  

 

I was thinking differential mode was.....different.  Smiley Wink

---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 3 of 3
(2,700 Views)