Machsupport Forum

Third party software and hardware support forums. => Modbus => Topic started by: mitip on December 03, 2012, 10:15:58 AM

Title: Homann Modio config error
Post by: mitip on December 03, 2012, 10:15:58 AM
My new Modio throws up a 'an unsupported operation was attempted' error box when I go to CONFIG plugins and config modio hardware. I am using slave address 1, have checked use modbus plugin under ports and pins and have resarted Mach 3 and PC.
I can see the new type config box under setup serial modbus and it accepts the modbus variables I set ie port 1 and slave 1.
I have triedgoing back to non-modbus plugin. The board lights flash and modbus test works. I am on a John Prentice plugin ver 2.1a Aug 2007.

Any ideas?

Mike mike@pmuk.com
Title: Re: Homann Modio config error
Post by: Peter Homann on December 04, 2012, 02:40:48 AM
Hi Mike,

As I explained in my email to you the other day, the plug is a contribution that is no longer supported by John. There appears to have been a change in Mach3 since the plugin was written that is causing the error.

I suggest that you use the Mach3 Brains to communicate with the ModIO. Every thing that the Plugin can do can be done by Mach3 Brains

Cheers,

Peter
Title: Re: Homann Modio config error
Post by: mitip on December 08, 2012, 08:19:52 PM
Peter
After a long discussion with john prentice i discovered the plugin was not supported. Shame his videos are still up though!,, very hard to know it does not work when current info is there.

If I use the non serial plugin set from ports and pins and have both mpg1&2 ticked on the setup serial modbus screen and under the Homann config box I can get mpg 1to work but not 2. Can I actually use 2 mpgs with mach3 turning? Does it get y and z confused assuming the second mpg is connected to the y axis. I can test modbus and see tHe register 0 for address 1150 filling as I rotate mpg1 but where does mpg 2 enter. I read it is 1155 is that correct? Can I use brains in this. Mode?. In this mode my analogues don't work despite having a vb script  set to inputs 64 65 66. The lights dim under diagnostics as I turn pots but what else should I set?

If I tick serial modbus plugin under ports and pins I can set up the config 0,1 etc and now the brain works and I can use it to get mpg1 working fine but am unclear what to set in the brain for mpg2 to work
In the brain editing setup I tick the serial plugin enabled modbus as an my type of input, I get mpg tick count with M6P0 and mpg 1 with m0p0 but what set up should i use for mpg2. I seem to get some but a funny backwardsand forwards motion by using config0 modbus address 7. Is this right or what should I set?

Title: Re: Homann Modio config error
Post by: Peter Homann on December 10, 2012, 02:59:11 AM
Mike,

Section 6.3 of the ModIO manual depicts the ModIO register addresses. To use both MPGs you need to be concerned with registers,
1150 - MPG1 Count
1155 - MPG2 Count
1156 - MPG Tick counter

In the Mogbus serial plugin configuration page, you need to set up a Modbus transaction that reads these 3 registers. The most efficient way to do this is to read 7 contiguous holding registers starting at register 1150. Read theses at a 25mS period  rate.


Then in the Brain you need to;
1. get register 1150 (ENCODER1) and assign it to the Mach3 MPG1 count
2. get register 1155 (ENCODER2) and assign it to the Mach3 MPG2 count
3. get register 1156 (TICKCTR) and assign it to the Mach3 Tick count

In the brain, since you are reading 7 registers starting at address 1150, assuming you are using config 0 in the plugin
address 1150 is accessed as MOD:0-P:0
address 1155 is accessed as MOD:0-P:5
address 1156 is accessed as MOD:0-P:6

If this is not clear, look at the videos on setting up the Modbus serial plugin configs.

Also read through the article I wrote on using the ModIO with Brains and the serial Modbus plugin.
http://www.homanndesigns.com/pdfs/Using_Modbus_with_Mach3.pdf

The Brain needs to set;
address 1150 (MOD:0-P:0) to Mach3 Control variable 'MPG1 Count'
address 1155 (MOD:0-P:5) to Mach3 Control variable 'MPG2 Count'
address 1156 (MOD:0-P:6) to Mach3 Control variable 'MPG TickCount'

With it setup you should be able to see the MPG1&2 counts on the Mach3 diagnostic page change as you rorate the MPGs.

Also you need to use the Mach3 jog tab (accessed by pushing the tab key) to assign MPG1 to the X-axis and MPG2 to the Z-Axis, or visa versa.

Cheers,

Peter


Title: Re: Homann Modio config error
Post by: cnc4pete on May 31, 2014, 03:36:52 PM
Peter,
Mike gave Up on the Lathe and I now own it, long story.

Now wish to finish the conversion. 
 Your comments above very useful and spent last 48Hrs on a step learning curve of Brain and Modio, having just used vanilla Mach3 for the last 8? years
Register 1155 appears to give no valid outputs. The MPG works, the LEDs work but reading the register from the test shows a fixed value, normally 0000 or FFFF so assume the chip is partially fried?  A quick check proves most of the other pins are OK. Is there any other possibility?  If not I assume it is buy a new board or live without a second MPG?

Regards Peter
Title: Re: Homann Modio config error
Post by: Peter Homann on June 02, 2014, 06:45:09 AM
Hi Peter,

If you have a ModIO LCD, the LED will show you the state of the MPGs and the 8 discrete inputs.

Also ensure that the MPGs are connected to inputs 1&2 and 7&8

Cheers,

Peter
Title: Re: Homann Modio config error
Post by: cnc4pete on June 02, 2014, 10:14:43 AM
Peter,

I am on the right pins at the Modio card end  12,13,14,15 for MPG1 and MPG2

Register 1155 does not change to MPG2 being moved.
Title: Re: Homann Modio config error
Post by: Peter Homann on June 02, 2014, 10:26:35 AM
Hi Peter,

Does register 1151 reflect the state of the 8 inputs pins as they are changed?

Cheers,

Peter
Title: Re: Homann Modio config error
Post by: Peter Homann on June 02, 2014, 10:30:50 AM
Also can you do a screen grab of the contents of 8 registers starting at register 100 hex?

Cheers,

Peter
Title: Re: Homann Modio config error
Post by: cnc4pete on June 02, 2014, 11:11:28 AM
Peter, third digit of 1151 changes with movement of either MPG

8 registers from 100Hex screen dump attached

Regards
Title: Re: Homann Modio config error
Post by: cnc4pete on June 02, 2014, 11:15:30 AM
I have a LCD screen, after initial DAL1H2Hp..........  It just shows "Cont Jog" at Top LHS
Title: Re: Homann Modio config error
Post by: Peter Homann on June 02, 2014, 06:37:19 PM
Peter,

Config registers look ok.

Can you disconnect the serial cable from the ModIO, that way Mach3 won't overwrite the LCD display.

Can you also disconnect all the inputs from the ModIO. If it is convenient, just remove the terminal block off the pin strip.

Using a jumper wire, can you now short each input to the GND pin on the ModIO.

On the LCD, you should see the state of each input . It should change as you short it to the GND pin. Can you do this for each of the inputs in turn, and let me know what you observe?

Cheers,

Peter

Title: Re: Homann Modio config error
Post by: cnc4pete on June 03, 2014, 04:02:41 AM
Peter,
Away from machine today will do as requested tonight.
However further investigation yesterday, got LCD back to status display, disabled brains.   The three A-D read ok and the MPG and switches change the values.

Will do the same in isolated mode and record the detail of the display.

Thanks for all the help.  HEX switch on 0, but could the core code be not the default,  Reading the pins but doing the wrong maths?   ( what I don't understand from the manual is if a new configuration is loaded how where is that stored, such that 0 is not over written. I assume Hex switch should be set to a vacant position and that loaded and reset. Seen no notes on this, at this stage have enough layers off the onion  and the default should do just fine for the controls I have.)

Peter
Title: Re: Homann Modio config error
Post by: cnc4pete on June 03, 2014, 05:02:08 PM
Peter,
Just Power and LCD connected.

I= 00
then short D in 0 reads 01, short Din 1 reads 02, short Din 2 reads 04, short Din 3 reads 08
Short Din 4 reads 10, short Din 5 reads 20, short Din 6 reads 40, short Din7 reads 80.

Further to this short a pair of pins and displays the sum. Also Short An1, 2 or 3 and reads 0000 on corresponding display

What next?

Regards Peter
Title: Re: Homann Modio config error
Post by: Peter Homann on June 03, 2014, 05:36:52 PM
Hi Peter,

That test shows that the discrete inputs are working correctly.

If you now connect the two MPGs to the ModIO. You should see each of  the MPG counters on the ModIO LCD display count up and down as you turn the MPGs.

Let me know what you find?

Cheers,

Peter
Title: Re: Homann Modio config error
Post by: cnc4pete on June 04, 2014, 04:53:22 AM
Peter,
Input strip plugged back on.
Rotating, slowly the MPGs, one at a time it is possibly to see four state, Corresponding to the LEDs of the MPG signal reflected in the most significant digit, first digit, of I= display. eg 30, 70, B0, F0
And C0, D0, E0 F0

Information/state  ok at input just not there at 1155

S1 also works for input from one of the MPGs

Regards Peter
Title: Re: Homann Modio config error
Post by: Peter Homann on June 04, 2014, 05:39:45 AM
And what about the MPG counter on the LCD display for MPG2? It is on the 4th row on the LCD at the bottom right.

Can you confirm that your 2nd MPG is connected to inputs 1&2

Cheers,

Peter
Title: Re: Homann Modio config error
Post by: cnc4pete on June 04, 2014, 07:34:15 AM
Peter,
EUREKA

I am there.  By pins 1 and 2 you mean physical connections pins 7 and 8  DIn 0 and DIn 1   !!!!!!!!

By which 2: then reads a value, Bottom RHS of LCD
 and on connection to PC/Mach3, tab to MPG & Brain turned on etc  MPG2 works, Thanks.

Where have I missed this as a set-up? since manual give MPG2pin as different?
Does this mean I can run Digispeed AND both MPGs since now not pin contention ?

Happy bunny !!!!
Thanks again.

Regards
Title: Re: Homann Modio config error
Post by: Peter Homann on June 04, 2014, 08:01:17 AM
Good to see its working now.

Yes you can also drive a DigiSpeed. You will need to switch the Hex switch off the 0 position. Initially switch it to the 6 position, reset the ModIO and check the comms setting on the ModIO display.

Peter

Title: Re: Homann Modio config error
Post by: cnc4pete on June 04, 2014, 08:25:45 AM
Peter
Where do I find, or is it ask, additional info, like on the other settings for this board?

I think the capability of this card is great, so don't keep it hidden please, publish more documentation.  What do the other switch positions enable?

Will order another to put on the mill also, when I have finished the rest of the Lathe.

Best Regards Peter
Title: Re: Homann Modio config error
Post by: Peter Homann on June 04, 2014, 06:50:39 PM
Peter,
It's n the manual. You need to read it end to end.

Peter
Title: Re: Homann Modio config error
Post by: cnc4pete on June 05, 2014, 03:53:23 AM
Peter,
Read it, scanned it several times each day, particularly when writing a response. Printed two copies, one next to the lathe, one on my desk, both annotated and pages tabbed etc.

BUT will continue to reread.
Found the detail of Pins 1 &2 in the release notes posted on the Yahoo group, but not as yet found direct or specific mention of what the other settings of the HEX switch do.
Guess I could set the switch, see if it still communicates and if it does read the config registers and overlay the bitcode to the function.  Then there would be an easy table of each valid HEX switch setting and what it enabled/disabled.   BUT as yet not found this level of information in the manual, like you say will reread.


Peter
Title: Re: Homann Modio config error
Post by: Peter Homann on June 05, 2014, 06:53:42 AM
The slave address hex switch is described in section 3.7 on page 17.

The only special position is '0' witch sets up a default configuration.

Peter