Keyboard Shortcuts
Likes
- ModIO
- Messages
Search
Homann Designs 2015 Christmas Break
Hi All,
Another year comes to a close too quickly. Homann Designs would like to take this opportunity to wish all a safe and merry festive season. We would also like to thank all for their support throughout the past year. The new webstore is finally installed (it's always more tricky than imagined), which will help with mobile navigation and brightens it up a bit. We will be closed until the 12th January 2016, taking a long deserved annual family camping holiday in Port Fairy. Hopefully, there won't be too many 40c plus days. Any orders place during this period will be processed once we return on the 12th. We will still be monitoring emails for anything urgent. We wish you a great festive season and look forward to supporting you in 2016. Cheers, Peter -- ----------------------------------------------------------------------------- web : email : sales@... Phone : +61 421 601 665 |
Re: ModIP Development
Hi Andy,
toggle quoted message
Show quoted text
I think I can accommodate all your suggestions. see the previous reply. Cheers, Peter On 29/03/2015 5:39 AM, 'Andy Wander' ohawiseguyeh@... [modio] wrote:
...and of course, if the new stuf could have a switchable RS-485/422/232 |
Re: ModIP Development
Hi Chris,
toggle quoted message
Show quoted text
Thanks for your input. The Arduino and Shield format is possible. The fact that there are so many shields and prototype boards around for the ardunio would mean that there are a lot of ready made IO boards. As to the ModIO there's no way to retrofit it to use IP. I do have plans to provide a gateway function on the ModIP so that it will include an IP to serial converter so you could daisy chain the ModIO off a ModIP. The ModIP will be accessible remotely via a network or even the internet. With that you could monitor a ModIP in the shed from the lounge room. :) As to the plugin, there is the plugin for the MP-03 pendant kit. I will email it to you. The LCD interface will probably be a serial one, that way I can cater for Graphical panels as well as character displays. I think I have a way to allow Arduino Shields to the ModIP, hopefully that will be in addition to the rest of the I/O Your questions and suggestions are all good. At the moment I'm in the early stage of design so all input is good. Cheers, Peter On 28/03/2015 7:37 PM, Christopher Leveck cwleveck@... [modio] wrote:
|
Re: ModIP Development
Here here! I'd like to third what Andy said. Chris
|
Re: ModIP Development
...and of course, if the new stuf could have a switchable RS-485/422/232
toggle quoted message
Show quoted text
port to talk to legacy stufff, it would be great! ...Hmm, what if the board DID accept accept Arduino shields...? -----Original Message-----
From: Andy Wander [mailto:ohawiseguyeh@...] Sent: Saturday, March 28, 2015 10:54 AM To: 'modio@...' Subject: RE: [modio] ModIP Development Yes, I'm good-looking forward to spring, which is almost here..... It would be really cool if the modules could be stacked like an Arduino shield-you could add as many or as few as you needed. The VFD interface should include a few additional relays and inputs; you never know what somebody will need. Also, what about a display module? That way the LCD display could also be remote mounted. I remember how I had to work to figure out where to put my ModIO in order to get the display where it needed to go on the controller box. And f course-Mach4 as well as Mach3 plugins! Andy Wander -----Original Message----- From: modio@... [mailto:modio@...] Sent: Saturday, March 28, 2015 12:45 AM To: modio@... Subject: Re: [modio] ModIP Development Hi Andy, All is good down under. :) I trust you are well. Yes, I can accommodate an isolated 0-10V control voltage. I was thinking of a VFD interface module. This would the voltage output include, relays to control the FWD/REV RUN/STOP terminals, etc. IT should be able to be used with VFDs and with Motor controllers such as the KBIC controllers. The small I/O blocks is a good idea. I'll look at a small module where different I/O boards can be plugged into them, a bit like an Arduino shield. Cheers, Peter On 28/03/2015 1:59 PM, 'Andy Wander' ohawiseguyeh@... [modio] wrote: signal to a VFD or other controller?a couple of inputs, each with its own Ethernet port and address. These couldbe located in different spots on a machine---------------------------------------------------------------------------- -- I'm correct.The ModIP is an Ethernet based Modbus device. Ethernet opens up a hugethat used in the ModIP so I should be able to squeeze a lot into it.ModIO for various tasks,accomodate in the design. |
Re: ModIP Development
Yes, I'm good-looking forward to spring, which is almost here.....
toggle quoted message
Show quoted text
It would be really cool if the modules could be stacked like an Arduino shield-you could add as many or as few as you needed. The VFD interface should include a few additional relays and inputs; you never know what somebody will need. Also, what about a display module? That way the LCD display could also be remote mounted. I remember how I had to work to figure out where to put my ModIO in order to get the display where it needed to go on the controller box. And f course-Mach4 as well as Mach3 plugins! Andy Wander -----Original Message-----
From: modio@... [mailto:modio@...] Sent: Saturday, March 28, 2015 12:45 AM To: modio@... Subject: Re: [modio] ModIP Development Hi Andy, All is good down under. :) I trust you are well. Yes, I can accommodate an isolated 0-10V control voltage. I was thinking of a VFD interface module. This would the voltage output include, relays to control the FWD/REV RUN/STOP terminals, etc. IT should be able to be used with VFDs and with Motor controllers such as the KBIC controllers. The small I/O blocks is a good idea. I'll look at a small module where different I/O boards can be plugged into them, a bit like an Arduino shield. Cheers, Peter On 28/03/2015 1:59 PM, 'Andy Wander' ohawiseguyeh@... [modio] wrote: signal to a VFD or other controller?a couple of inputs, each with its own Ethernet port and address. These couldbe located in different spots on a machine---------------------------------------------------------------------------- -- I'm correct.The ModIP is an Ethernet based Modbus device. Ethernet opens up a hugethat used in the ModIP so I should be able to squeeze a lot into it.ModIO for various tasks,accomodate in the design. |
Re: ModIP Development
Do me a favor if you're going to do anything that looks like an Arduino shield could you make the pins standard so I can make my own shields to go on them? I stopped looking at this stuff a while ago because I didn't know if it was going anywhere please forgive me for saying so but I'm encouraged that you're going to do something new. And I don't know if it's appropriate or not but while Ive got your attention, I hope, I quite literally have all of the parts and pieces to make a pendant and was pretty excited to build one but I can't find or figure out I guess, where to get the plugin or whatever I need to make it work with Mach 3 or maybe Linux CNC.
|
Re: ModIP Development
Hi Andy,
toggle quoted message
Show quoted text
All is good down under. :) I trust you are well. Yes, I can accommodate an isolated 0-10V control voltage. I was thinking of a VFD interface module. This would the voltage output include, relays to control the FWD/REV RUN/STOP terminals, etc. IT should be able to be used with VFDs and with Motor controllers such as the KBIC controllers. The small I/O blocks is a good idea. I'll look at a small module where different I/O boards can be plugged into them, a bit like an Arduino shield. Cheers, Peter On 28/03/2015 1:59 PM, 'Andy Wander' ohawiseguyeh@... [modio] wrote:
|
Re: ModIP Development
开云体育Hi Peter: ? How've you been lately? ? A couple of ideas I thought of: ? -could you include circuitry to make it easy to send an isolated 0-10V signal to a VFD or other controller? ? -It might be really handy to have some small IO blocks, like 4 relays and a couple of inputs, each with its own Ethernet port and address. These could be located in different spots on a machine ? Andy Wander From:
modio@... [mailto:modio@...] ? ? Hi All, ? It's been quite a while since this group has been active, a year or so if I'm correct. ? Anyhow, I'm in the process of starting back onto the ModIP development. The ModIP is an Ethernet based Modbus device. Ethernet opens up a huge possibilities for ModIP.? ? The microprocessor used will be an order of magnitude more powerful than that used in the ModIP so I should be able to squeeze a lot into it. ? The purpose for this message is to ask those of you that have used the ModIO for various tasks,?
This input will help me decide the range of features that I need to accomodate in the design. ? Cheers, ? Peter |
ModIP Development
Hi All, It's been quite a while since this group has been active, a year or so if I'm correct. Anyhow, I'm in the process of starting back onto the ModIP development. The ModIP is an Ethernet based Modbus device. Ethernet opens up a huge possibilities for ModIP.? The microprocessor used will be an order of magnitude more powerful than that used in the ModIP so I should be able to squeeze a lot into it. The purpose for this message is to ask those of you that have used the ModIO for various tasks,?
This input will help me decide the range of features that I need to accomodate in the design. Cheers, Peter |
Re: ModIO Analog Input Variation
You could try putting a 100uF cap between the pins. Also you might try
adding a.1000uF cap on the 5v line to to smooth out the adc ref. Jacob On Feb 24, 2012 10:16 AM, "Kirk Wallace" <kwallace@...> wrote: ** |
Re: ModIO with libmodbus and Reset
On Sat, 2012-02-11 at 14:25 +1100, Peter Homann wrote:
I haven't looked into these yet, but here is a link to the get/set timers in the Common section: I assume the timer is set to 3.5 bits which hase worked with VFD's so far. Previously I would get missing characters on the LCD along with the reply errors, which makes me think the timer setting might not be the issue. I think the port close, open, sleep, dummy read works pretty well so far, although not the approved method. The more I play with it the more I'll learn. Thanks. -- Kirk Wallace California, USA |
Re: ModIO with libmodbus and Reset
On Fri, 2012-02-10 at 17:27 -0800, Kirk Wallace wrote:
This version works as I think it should. The port close, open, sleep(1), and dummy read are all needed. ~~~~~~~~~~~~~~~~ /* * Copyright ? 2008-2010 Stéphane Raimbault <stephane.raimbault@...> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <>. */ #include <stdio.h> #include <unistd.h> #include <string.h> #include <stdlib.h> #include <errno.h> #include <modbus.h> // #include "unit-test.h" int main(int argc, char *argv[]) { modbus_t *ctx; int rc; char lcdchar[80]; int lcdgrp[40]; uint16_t regdata[24]; uint16_t *lcddata; uint16_t *dummy; ctx = modbus_new_rtu("/dev/ttyS0", 57600, 'N', 8, 1); if (ctx == NULL) { fprintf(stderr, "Unable to create the libmodbus context\n"); return -1; } modbus_set_slave(ctx, 6); if (modbus_connect(ctx) == -1) { fprintf(stderr, "Connection failed: %s\n", modbus_strerror(errno)); modbus_free(ctx); return -1; } printf("** TESTING **\n"); rc = modbus_read_registers(ctx, 100, 7, regdata); printf("\nmodbus_read_registers: "); printf("rc = %d\n", rc); if (rc == 7) { printf("OK\n"); } else { printf("FAILED to read registers\n"); goto close; } printf("100 = %0X\n", regdata[0]); printf("101 = %0X\n", regdata[1]); printf("102 = %0X\n", regdata[2]); printf("103 = %0X\n", regdata[3]); printf("104 = %0X\n", regdata[4]); printf("105 = %0X\n", regdata[5]); printf("106 = %0X\n", regdata[6]); printf("OK\n"); printf("\n** Setting up LCD **\n"); regdata[1] |= (1 << 0); /* enable LCD */ // regdata[1] &= ~(1 << 0); /* disable LCD */ // regdata[1] |= (1 << 7); /* disable debug display */ // regdata[1] = 0x84; /* Default */ rc = modbus_write_register(ctx, 101, regdata[1]); printf("write rc = %d\n", rc); rc = modbus_read_registers(ctx, 101, 1, ®data[1]); printf("read rc = %d\n", rc); printf("101 = %0X\n", regdata[1]); rc = modbus_write_register(ctx, 1140, 1); printf("reset = %d\n", rc); modbus_close(ctx); modbus_free(ctx); ctx = modbus_new_rtu("/dev/ttyS0", 57600, 'N', 8, 1); if (ctx == NULL) { fprintf(stderr, "Unable to create the libmodbus context\n"); return -1; } modbus_set_slave(ctx, 6); if (modbus_connect(ctx) == -1) { fprintf(stderr, "Connection failed: %s\n", modbus_strerror(errno)); modbus_free(ctx); return -1; } sleep(1); rc = modbus_read_registers(ctx, 101, 1, dummy); printf("\ndummy read rc = %d\n", rc); printf("\n** Write to LCD **\n"); rc = modbus_write_register(ctx, 1000, 0x3130); printf("write rc = %d\n", rc); rc = modbus_write_register(ctx, 1001, 0x3332); printf("write rc = %d\n", rc); rc = modbus_write_register(ctx, 1002, 0x3534); printf("write rc = %d\n", rc); rc = modbus_write_register(ctx, 1003, 0x3736); printf("write rc = %d\n", rc); printf("\n** Done **\n"); close: modbus_close(ctx); modbus_free(ctx); return 0; } ~~~~~~~~~~~~~~~~~~~~ Output ~~~~~~~~~~~~~~~~~~~~ ** TESTING ** modbus_read_registers: rc = 7 OK 100 = 0 101 = 85 102 = 9F 103 = FF 104 = FF 105 = FF 106 = FF OK ** Setting up LCD ** write rc = 1 read rc = 1 101 = 85 reset = -1 dummy read rc = -1 ** Write to LCD ** write rc = 1 write rc = 1 write rc = 1 write rc = 1 ** Done ** |
Re: ModIO with libmodbus and Reset
Hi Kirk,
toggle quoted message
Show quoted text
Looking at the program, I can't see where you specify, the timeout period for when the master decides that the slave hasn't responded. I haven't used libmodbus, but there should be a way when setting to the master, to specify the timeout. This may be why the master keeps reporting errors. Cheers, Peter. On 11/02/2012 12:27 PM, Kirk Wallace wrote:
On Sat, 2012-02-11 at 11:06 +1100, Peter Homann wrote:Just in case, here is the program below. I'm not that good with C so --
----------------------------------------------------------------------------- eStore: Web : ModIO - Modbus Interface Unit email : peter@... DigiSpeed - Isolated 10Vdc I/F Phone : +61 421 601 665 TurboTaig - Taig Mill Upgrade board |
Re: ModIO with libmodbus and Reset
On Sat, 2012-02-11 at 11:06 +1100, Peter Homann wrote:
Just in case, here is the program below. I'm not that good with C so don't be surprised if it is poorly written. ~~~~~~~~~~~~~~ /* * Copyright ? 2008-2010 Stéphane Raimbault <stephane.raimbault@...> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <>. */ #include <stdio.h> #include <unistd.h> #include <string.h> #include <stdlib.h> #include <errno.h> #include <modbus.h> // #include "unit-test.h" int main(int argc, char *argv[]) { modbus_t *ctx; int rc; char lcdchar[80]; int lcdgrp[40]; uint16_t regdata[24]; uint16_t *lcddata; ctx = modbus_new_rtu("/dev/ttyS0", 57600, 'N', 8, 1); if (ctx == NULL) { fprintf(stderr, "Unable to create the libmodbus context\n"); return -1; } modbus_set_slave(ctx, 6); if (modbus_connect(ctx) == -1) { fprintf(stderr, "Connection failed: %s\n", modbus_strerror(errno)); modbus_free(ctx); return -1; } printf("** TESTING **\n"); rc = modbus_read_registers(ctx, 100, 7, regdata); printf("\nmodbus_read_registers: "); printf("rc = %d\n", rc); if (rc == 7) { printf("OK\n"); } else { printf("FAILED to read registers\n"); goto close; } printf("100 = %0X\n", regdata[0]); printf("101 = %0X\n", regdata[1]); printf("102 = %0X\n", regdata[2]); printf("103 = %0X\n", regdata[3]); printf("104 = %0X\n", regdata[4]); printf("105 = %0X\n", regdata[5]); printf("106 = %0X\n", regdata[6]); printf("OK\n"); printf("\n** Setting up LCD **\n"); regdata[1] |= (1 << 0); /* enable LCD */ // regdata[1] &= ~(1 << 0); /* disable LCD */ // regdata[1] |= (1 << 7); /* disable debug display */ // regdata[1] = 0x84; /* Default */ rc = modbus_write_register(ctx, 101, regdata[1]); printf("write rc = %d\n", rc); rc = modbus_read_registers(ctx, 101, 1, ®data[1]); printf("read rc = %d\n", rc); printf("101 = %0X\n", regdata[1]); /* rc = modbus_write_register(ctx, 1140, 1); printf("reset = %d\n", rc); */ printf("\n** Write to LCD **\n"); rc = modbus_write_register(ctx, 1000, 0x3130); printf("write rc = %d\n", rc); rc = modbus_write_register(ctx, 1001, 0x3332); printf("write rc = %d\n", rc); rc = modbus_write_register(ctx, 1002, 0x3534); printf("write rc = %d\n", rc); rc = modbus_write_register(ctx, 1003, 0x3736); printf("write rc = %d\n", rc); printf("\n** Done **\n"); close: modbus_close(ctx); modbus_free(ctx); return 0; } ~~~~~~~~~~~~~~~~~~~ -- Kirk Wallace California, USA |
Re: ModIO with libmodbus and Reset
On Sat, 2012-02-11 at 11:06 +1100, Peter Homann wrote:
Sorry about that. Are you saying that you are making changes to the configuration in theI often forget to do this manually, so I thought I would put it into the program that makes the configuration change. Yes, I suspect the the reply packet from the reset query doesn't come back, so the function that sent the query returns an error. I just print the result to the screen and go on to writing to the LCD. I put a sleep(5) after the reset, but the LCD writes fail after that. I put a sleep(1) after each LCD write and some characters got through. So, I suppose, after sending a reset to the ModIO, I should also reset the PC's serial port too? I don't know how to do that yet but I guess I could just close the port, then open it again. That said, the ModIO just ignores the request and should pick it up onThat's what seems to happen with my LinuxCNC application. Thanks. This gives me something to go on. -- Kirk Wallace California, USA |
Re: ModIO with libmodbus and Reset
Hi Kirk,
toggle quoted message
Show quoted text
I'm struggling to understand what you are saying. :) Are you saying that you are making changes to the configuration in the ModIO? If so, yes you need to reset the ModIO for the configuration to take effect. When you say that "a reset in my program returns a send error", are you saying that your programs sends a modbus request to the ModIO and your program does not receive a modbus reply from the ModIO? If this is the case, then you will need to program an exception into your software as resetting the ModIO is like cycling the power on it. You will never get a response. Your program needs to send the request to reset, then when the modbus lib times out, ditch the error and move on. The only way the ModIO errors is if it gets an incomplete modbus request. The ModIO probably comes out of reset, and receives an incomplete modbus request that was in the middle of being sent, so the ModIO detects the error. That said, the ModIO just ignores the request and should pick it up on the next request. The way to handle resetting the ModIO, is to send the request to the ModIO, wait for the modbus timeout, then pause for a second or two before restarting communications with the ModIO. Cheers, Peter. On 11/02/2012 10:11 AM, Kirk Wallace wrote:
I've been playing with libmodbus 3 on a Ubuntu PC and a ModIO. It works --
----------------------------------------------------------------------------- eStore: Web : ModIO - Modbus Interface Unit email : peter@... DigiSpeed - Isolated 10Vdc I/F Phone : +61 421 601 665 TurboTaig - Taig Mill Upgrade board |
ModIO with libmodbus and Reset
I've been playing with libmodbus 3 on a Ubuntu PC and a ModIO. It works
fine, but if I make a configuration change, I need to reset the ModIO in order for the change to take effect. The problem is that a reset in my program returns a send error. My guess is that the reset starts before the reply packet gets sent. Also, even after settling for a bit the next packet sent to the ModIO errors too. Is there a recommended procedure for doing a reset within a program? A reset seems to work okay in my LinuxCNC application, but that runs in a loop which maybe flushes the problem out. -- Kirk Wallace California, USA |