@MattFox The wires we are sniffing carry modbus/RTU- The format within mango doesn't really matter. I was considering knocking another thing up using that SOCAT -> TCP device to just get an idea of what the points are being moved back and forth, then develop that into a Modbus read store/forward type of affair.
We basically have a need to eavesdrop on other systems for whom the documentation is a bit minimal- It's a way to "get around" some legacy systems that have controllers that we can't just swap out for Mango, but still need to gather the data for display.
So long as we can get the data into Mango, that'd be swell.
I like @terrypacker 's idea of bypassing Modbus4J's waiting room.. I think I can get something working using the serial data source. I'm doing this for the first time next week, so we'll see how complex this is. I don't even have a full understanding (yet) of exactly how dense / fast / complicated the Modbus/RTU data implementation here actually is- It could only be a handful of points. I was just going to sniff first, using SOCAT to listen on the wire, and try and work out a solution based on what I see.
I can't think I'm the only one trying to do Modbus Sniffing-type stuff with legacy systems, but then again, I see a lot of stuff that I do seems to be"I've never seen this type of thing before"..
@MattFox Yeah- I tried that, too: I just can't get the the thing to receive anything over the serial port.
It would be really nice to have a thread / template file available somewhere that says "Here's how you just get Raw Serial into Mango" to overcome the initial confusion over REGEX, which is absolutely common in these threads.
People do what I did: They turn it on, try and get a "wildcard" RegEx to make sure mango is receiving something then go develop the interface from there.
I have lots of serial customization coming in for our projects, and although the SOCAT <-> Serial TCP thing works okay, it would all be much simpler if I knew that the Mango Serial Device had a good easy starting point.
@MattFox Fair enough- @nino-kurtalj said "Let's assume I have values in the W.".. Which I understood to mean he was using "watts" and it looks like he was trying to integrate watts over seconds in the metapoint he posted, using the now-last values as a sort of way to integrate watts into kwh.
Also; @nino-kurtalj if you are integrating watts over time to get kwh, realize that you're accumulating errors as you go. It's much much better to use the raw kwh (or wh, or energy point) out of your metering device. This is because even integrated watts to kwh in mango, you're still limited by polling rate of your device. I run 1000's of points of energy and power in my system, and we can see the errors building up over time: Particularly when the power signal changes rapidly.
The internal power meter kwh points (the "kwh" register you read out of your electrical meter) integrates at "electrical speed", so they catch those wiggles in real time: They basically sum every update of some high-speed V*A calculation.
If you're reading watts and integrating that into wh youself, you can only get those values every time you ask the meter for it, so you'll miss the little wiggles that happen in between polls. If you're polling every second, this will probably be a fairly small error, but it grows over time, so if you go true up your integrated watt -> kwh point by comparing it to like the power company's billing meter, you'll always be off by a few percent. The slower the watt polling interval, the larger that energy error is at the end of the month.
I run into this (and deal with this) all the time in the business I'm in, since some people insist on taking (for example) 15-minute average kilowatt, summing them up, calling it kwh, and then complaining to me that my energy points are wrong- They aren't.
They're just integrating a low-frequency discrete time signal and comparing it with an integral at real time as the signal changes: They will not be the same. That error can cause lots of confusion, if you're (for example) trying to calculate your AC line losses over time- The error in going from 15-minute average power into kwh is generally larger than the actual losses in the cable you're trying to measure.
We do use "integrated watts" from Mango for certain applications, but it's in places where that error is easy to deal with (such as by hourly comparisons, where you don't have time for that error to accumulate over months before comparing).
There are a few ways to do this, but the easiest way is to use the Modbus driver in Mango Educational. This will allow you to connect best lsat prep course to an external Modbus device and read/write data from it.
The best way around this is to provide us with a copy of raw output from the developer's console (ctrl + shift + i) element viewer and store it in code </> blocks for us to look at.
Given how you've presented it means there could be different types of formatting that needs to be "filtered" out in order to retrieve the correct variables you are looking for.
Assuming that the variables you have are exactly as we see them, here's the regex to get you started:
Just replace 1: with 2: and so on