- Jan 23, 2021
-
-
Hans Unzner authored
Setting DEBUG=3 on transactions produces a lot of useless debug information what makes it impossible to read the data bytes. That is now moved to DEBUG=4.
-
- Jan 17, 2021
-
-
Hans Unzner authored
mb2hal: added int input to fnct_06_write_single_register and fnct_16_write_multiple_registers, updated doc
-
- Jan 08, 2021
-
-
Hans Unzner authored
-
Hans Unzner authored
Tested with SAMSON 5578 / SAMSON SAM Home Gateway
-
- Dec 31, 2020
-
-
Hans Unzner authored
-
- Apr 21, 2020
-
-
andypugh authored
Mainly truncation warnings, but a couple of others too. Signed-off-by: andypugh <andy@bodgesoc.org>
-
- Apr 18, 2020
-
-
Jeff Epler authored
-
Jeff Epler authored
-
- Jun 03, 2019
-
-
Sebastian Kuzminsky authored
* origin/2.7: fix some compiler warnings in libnml debian buster packaging: use correct package names for python imaging debs let debian/configure specify python-imaging and python-imaging-tk package names debian/configure: Debian-testing will become Debian-10 packaging: don't depend on python-gnome2 remove unused program halgui hy_gy_vfd: fix modbus byte timeout mb2hal: add support for libmodbus 3.1.2 and newer
-
Sebastian Kuzminsky authored
This commit makes mb2hal build with both libmodbus < 3.1.2 (Debian Stretch and older) and libmodbus >= 3.1.2 (Debian Buster).
-
- Aug 21, 2018
-
-
Lars Bensmann authored
When a communication error happens and a transaction is just partially read the modbus link can get out of sync. The next transaction gets the unconsumed data from the transaction before and so on and the link does not recover form this. modbus_flush() prevents this behaviour.
-
- Aug 19, 2018
-
-
Lars Bensmann authored
Add fnct_06_write_single_register function as not all devices (e.g. Parker AC10 VFD) support fnct_16_write_multiple_registers.
-
- Jan 22, 2018
-
-
Sebastian Kuzminsky authored
Conflicts: docs/man/man1/halstreamer.1 lib/python/gladevcp/combi_dro.py src/emc/motion/command.c src/emc/task/emccanon.cc src/emc/usr_intf/emcrsh.cc src/emc/usr_intf/gmoccapy/getiniinfo.py src/hal/components/biquad.comp src/hal/components/orient.comp src/hal/components/streamer.c
-
- Jan 21, 2018
-
-
Sebastian Kuzminsky authored
-
Sebastian Kuzminsky authored
-
- Sep 15, 2017
-
-
Lubomir Rintel authored
If you write to 59 Temple Place you're unlikely to get a response. Let's realign the address with a more up-to-date one from [1]. [1] https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt This is purely a cosmetic change, doesn't affect the meaning of the license. Done to make rpmlint happy. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
-
- Jul 01, 2017
-
-
Les authored
The comminications threads could loop indefinitely without sleeping while waiting for transactions to complete. Added 1ms sleep. Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
-
Les authored
The PIN_NAMES option allows you to specify names for each individual pin, instead of consecutive numbers Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
-
- Aug 20, 2016
-
-
Jeff Epler authored
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
-
- Jul 04, 2016
-
-
Luke Peterson authored
libmodbus version 3.1.2 introduced backwards incompatible API changes in modbus_set_response_timeout and modbus_set_byte_timeout functions. This patch adds conditional compilation to use the API appropriately based upon the result of the LIBMODBUS_VERSION_CHECK macro. Issue: https://github.com/LinuxCNC/linuxcnc/issues/105 Signed-off-by: Dale Lukas Peterson <hazelnusse@gmail.com>
-
- Jul 27, 2014
-
-
Chris Radek authored
-
- Sep 06, 2013
-
-
Jeff Epler authored
The prior code uses questionable casts to do what can be done with modulo integer math. The new code does not give *exactly* the same timeout, because the calculation (int)(float)(this_mb_tx->mb_response_timeout_ms / 1000.0) is subject to rounding errors, while timeout.tv_sec = this_mb_tx->mb_response_timeout_ms / 1000; is not. For example for a response timeout of 2001ms, the old code would actually give a timeout of 2.000999 seconds, while the new code gives the correct result of 2.001000 seconds. The new code begins giving "radically" different (but again more correct) values around 65536 seconds due to the loss of precision in float arithmetic (65536.000f == 65536.001f when you have a 24-bit mantissa) Tested by cut&paste of old and new code into a test harness: struct timeval fold(long arg) { struct timeval timeout; timeout.tv_sec = (int)(float)(arg / 1000.0); //int part of the float timeout.tv_usec = ((float)(arg / 1000.0) - timeout.tv_sec) * 1000000; return timeout; } struct timeval fnew(long arg) { struct timeval timeout; timeout.tv_sec = arg / 1000; timeout.tv_usec = (arg % 1000) * 1000; return timeout; } void check(long timeout) { struct timeval ta = fold(timeout); struct timeval tb = fnew(timeout); double a = ta.tv_sec + ta.tv_usec * 1e-6; double b = tb.tv_sec + tb.tv_usec * 1e-6; if(fabs(a - b) > .001) { // if(ta.tv_sec != tb.tv_sec || ta.tv_usec != tb.tv_usec) { printf("fail tv_sec %lu: %lu.%06lu != %lu.%06lu\n", timeout, (long) ta.tv_sec, (long) ta.tv_usec, (long) tb.tv_sec, (long) tb.tv_usec); } } int main() { long i; for(i=0; i<1000*1000*1000; i += 500) { check(i); check(i+1); check(i+499); } }
-
- Jun 05, 2013
-
-
Sebastian Kuzminsky authored
By default, configure will now look for libmodbus (installed from a separate deb, provided by Ubuntu for Precise and by the linuxcnc.org debian archive for Hardy and Lucid) and error out if it can't be found. The user can disable this check (and disable compilation of all drivers that use libmodbus) by configuring with "--without-libmodbus".
-
- Mar 27, 2013
-
-
Sebastian Kuzminsky authored
-
- Nov 13, 2012
-
-
Victor Rocco authored
- Arduino example added. Tested with Arduino Mega 2560 R3 using Modbusino over USB at 115200 bps. - New parameters in config file. HAL_MODULE_NAME, MB_RESPONSE_TIMEOUT_MS and MB_BYTE_TIMEOUT_MS. - New HAL pin "num_errors" for each transaction. num_errors = 0 if last transaction OK, else the count of failed transactions. - Fix a bug, OPTIONAL's parameters may be 0 instead of default value if not specified in 1st transaction. Signed-off-by: Michael Haberler <git@mah.priv.at>
-
Victor Rocco authored
- Mb2hal now uses libmodbus3 instead of the old libmodbus file located in src/hal/user_comps/modbus.c used by gs2_vfd.c # Also fix a TIMEOUT bug (due to this unpatched old libmodbus file). - Better INI file documentation (HOW-TO). - Better Submakefile. - Source code cleaned and reordered. # Now is posible to add new functionallity. See LogBook.txt for more information. Signed-off-by: Michael Haberler <git@mah.priv.at>
-
- Nov 01, 2012
-
-
Sebastian Kuzminsky authored
-
- Oct 27, 2012
-
-
Victor Rocco authored
Nothing big, two instances of dead initialization (so, a variable is explicitly set at define-time, but then written to again before being read). Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
-
- Oct 24, 2012
-
-
Michael Haberler authored
This reverts commit ca835b429478324639df779e26005ca43b8917d1. Victor says it is needed.
-
Michael Haberler authored
-
Victor Rocco authored
Userspace HAL component to communicate with one or more Modbus devices. Tests: - TCP some functions = Remote IO Delta RTU-EN01, 24 inputs, 8 outputs. - RS232 some functions = Servo Drive Delta ASDA-B (1021-A 1Kw). - TCP all functions = MoD_RsSim V8.20 (www.plcsimulator.org) on Windows XP SP3. Signed-off-by: Michael Haberler <git@mah.priv.at>
-