Want to share a UDFB? Here's the place! NOTE: This page contains files and links to items developed by third parties. Unitronics bears no responsibility for any consequences of accessing and using any third-party items of any kind.
It would be great to have a logic function which gives you a number of ones or zeroes in a register or array of bits. It's super useful when you want to check for condition if only one bit is on at a time. Good for checking some input conditions.
For example: 0001011 (0x17) would output 3 (as there are 3 ones). Bit array "0000000000000001000000" would output just 1 because there's just one logical true bit.
Sure, it could be done via software, but a dedicated function for that would be a time saver.
**** SOLVED ****
Hi guys, thank you so much for your help over the last few days. It turns out that there was a dodgy earth to the 24V power supply feeding the Unitronics unit.
It was strange as everything else worked, it only seemed to be affecting the analog inputs to the unit. As soon as the earth was sorted i was getting the values i expected in the inputs from the outputs.
Thanks again guys for all of your time.
Thanks,
I did use the software recommended to format the SD card. When I try to view the .img file even in windows it says file appears to be corrupt. I've re-downloaded it several times and on different pcs with the same results.
Merle, the point Gabriel is making is that hardware scaling is essentially fixed and can't be adjusted easily. Ladder versions can.
JR, side question....Are you sure that you haven't got mixups in various settings, so that 4-20ma and other mistmatches are happening?
FYI.....Although this was made for Visilogic, perhaps it might be useful for your "play" and diagnostic purposes. I'm sure the fundamentals are similar. The whole point for me making it in the first place relates to Gabriel's similar use, where minor tweaking of some numbers in use gets things exactly right. Online interaction and adjustment can then be done. In my case in Visilogic, after tweaking I change values to permanent.
https://forum.unitronics.com/topic/3540-linearization-calculator-for-all/
cheers, Aus