Machsupport Forum
Third party software and hardware support forums. => Modbus => Topic started by: giannis121 on April 23, 2012, 01:33:34 PM
-
I have made a slave device with an AVR uC.
By using ComTestPro http://www.baseblock.com/PRODUCTS/demosoftware.htm
i can enable and disable an output.
Now the question is how will i configure the mach3 to work with it.
What i have done until now is:
Config-> Port&Pins-> Checked "Modbus Input" & Plugin (1)
Function CFGs-> SetupSerial Modbus-> see attachment (2)
I have made a brain that reads a user LED and sends the status to modbus (3)
In any way or settings i cant change the status of the output.
(While i am receiving modbus commands for staying OFF.
Do i miss anything?
I need help....
-
Hi,
From what I can see, in the brain, you are using the address value of 1 and cfg# of 0.
The address in the brain dialog is actually the offset index from the start of the CFG#0
So try address 0 and see how you go.
Also get it communicating with Mach3 first by using the Test page, accessed from the Modbus config plugin
Cheers,
Peter.
-
Amazing!
It was like 2 days playing with ports, addresses, bits....
Thank you Peter!
-
It's not real clear. Glad to see you have it working.
If you haven't already, have a look at the ArtSoft VideoTutorials;
http://www.machsupport.com/videos.php
and the document I wrote: Using Modbus with Mach3
http://www.homanndesigns.com/pdfs/Using_Modbus_with_Mach3.pdf
Cheers,
Peter
-
Now a new question about reading input registers.
Are the settings OK? (see attached)
I never see the Mod:0 P:1 working or changing va,ues on the DRO selected.
(This time i tried one address back!).
Also i am not sure if the code i am sending bacjk is correct.
i receive hex: 01-03-00-01-00-01-5D-CA
and i send back hex: 01-03-02-00-1e-5D-CA
Can you help on that?
(thank you in advance!)
Giannis
-
Oops!!!
This last post of mine has wrong calculation on the CRC code (the last 2 bytes).
So, its not problem of mach3.
I am sorry for this!
[Well there is no any indication or screen that i can see modbus data there,
so its a bit complicated to calculate everything! - ( Did i save it? ;D )]
Giannis