Hello Guest it is April 16, 2024, 03:17:21 PM

Author Topic: New Pokeys 56 Modbus config with MACH  (Read 11414 times)

0 Members and 1 Guest are viewing this topic.

New Pokeys 56 Modbus config with MACH
« on: April 19, 2011, 04:57:07 PM »
Hello, I am trying to configure mach3 and pokeys56 to see each other though the modbus interface. So far I have nothing but headache. I installed the device with the IP of 192.168.1.4 and made a connection with the control software. Everything works - digital inputs, encoders, analog inputs, etc.

First of all I started with the Modbus serial control monitor but have trouble understanding the correct slave address and start address values for the pokeys.

I watched the video for mach3 modbus config but it was intended for serial connection. I read through the manual, machsupport forum and wiki, but could not put it all into work. Will be glad if someone points me where to start about learning the mach3 to pokeys modbus connection.

Todor

Offline borisz

*
  •  220 220
    • View Profile
    • www.poscope.com
Re: New Pokeys 56 Modbus config with MACH
« Reply #1 on: April 19, 2011, 05:23:09 PM »
I know that some people succesfully using PoKeys56E with Mach over ModBus.
I hope that some of them will read these post.
www.poscope.com home of PoKeys USB HID, IO, USB, Ethernet controler and PoScope USB PC oscilloscope
Re: New Pokeys 56 Modbus config with MACH
« Reply #2 on: April 20, 2011, 12:32:06 AM »
I managed to read data from the device, entering the correct register address in the field, so I am sure MACH3 sees it. I guess I will have to watch the tutorial videos again to understand what needs to be done next.

I am running mach3 in simulation because I have installed it on a 64bit ver of win7. I am not sure if it will correctly manage I/O in that mode. Maybe I'll have to move to the XP machine.

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: New Pokeys 56 Modbus config with MACH
« Reply #3 on: April 20, 2011, 08:06:37 AM »
Perhaps I am misunderstanding you, but did you say you hooked up the PKE (PoKeys Ethernet), to the serial modbus?

at any rate, Let me list some steps to hook to it via TCP modbus (also, download and read the "Brains Users Guide", in the member docs section, it goes over how to set up both serial and TCP modbus and your comp).

Steps:

1 Set up the IP address of your PK device using the PK software, (you have done that).
also, assign a "device" number to your pokeys.
2 In your comp, under networkng, set your IP4 of your comps ether card to the same local net IP, gateway
is the same.
3 in TCP modbus put the PK IP, in the master addy, for each config (each one talking to a type of modbus register
range/type), set your PKEs IP, and the device number you have to it.

scott
fun times
Re: New Pokeys 56 Modbus config with MACH
« Reply #4 on: April 21, 2011, 08:08:36 AM »
I read the Brains Users Guide, this is some good doc.
The PK is used with the TCP Modbus as it should. I made a simple brain, using the first 3 pins on it with some switches wired and it is working. These were configured as inputs 0-2, as it is 0-based, so far so good.

Now I have trouble getting data from the analog inputs. I wired a POT to pin 43 which is at address 12 on the registers. I did test it on the modbus testing page and it is working, giving a DEC values from 0 to 4091.  I watched the video for macropumps but it was intended for the ModIO card, so "getinput (64)" returns the value of the analog input 1, wired at pin 2 of the device. I found this on the ModIO manual, but did not quite understand, is this 64 value some sort of register or what?

The question now is what I enter after "getinput" to get data from the analog inputs of PK? I could not find info on this VB command.

I have made 2 configurations on the TCP Modbus dialog box. Config0 is 10 registers starting from 0 as discrete inputs, and Config1 is 7 registers starting from 10 as input registers. The second config is for the analog inputs.
This is another thing I doubt about. Since the PK manual says 0-54 addresses are discrete inputs, but 10-16 are analog inputs, do I have to make 2 configurations - one starting at 0 with 55 registers and the other at 10 with 7 registers?
Or I have to make 3 configs, the one 0-9 registers, the other 10-16 for the analog inputs and a third for the rest of the discrete inputs - 17-54?

The more I get into this, the more questions get generated here but gradually I am making some progress.

Thanks for the info

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: New Pokeys 56 Modbus config with MACH
« Reply #5 on: April 21, 2011, 11:54:59 PM »
whoa!!!

   ok, were to start...........

unfortunatly, there is poor documentation of the modbus/brains systems, but, I do recommend you also watch the videos on those subjects as well.....

there is NO VB that will interface with TCP/IP modbus, you can ONLY access Ether via Brains or a plugin.

Each config is it's OWN animal..........

i.e. lets say that you want to read in discrete inputs 1-10 in cfg 0, and you want to read in Analog inputs in cfg2.

In cfg0, you would put them as discrete inputs register numbers is 10, range starts at 0 (or what ever the start range is for the DI, that will need to be in its decimal equivelant).

in cfg2, that would be a input holding type of data, register number would be how ever many inputs anlog your brining in, also its start range would be where ever the start range for analog starts at, lets say if only 4 inputs where possible, and pin 43 was the First input you could bring in as analog. further lets say the analog input range started at 3000, so in your config, you would put your start range as 3000, and since you want the first analog that would be LOCAL var 0.

the Local vars do not increment up, based on the cfgs below it........ they each live in thier own universe, and local var "0" is the start address, local var 1, is start address + 1.

scott
fun times
Re: New Pokeys 56 Modbus config with MACH
« Reply #6 on: April 22, 2011, 05:09:29 PM »
Hi, after a lot of reading to your last post I finally got it.

So when my analog inputs are at cfg#1 starting at address 10 and I have a local Var of 0, my first analog input is at Modbus 0, cfg#1. I first thought it should be at modbus"10" in the brain, that's why I did not get any data.

Everything is fine now, it is a matter of some "brain" work to do what I want.
Maybe when I setup everything I will post my configuration here so other people should not pull their hair so much. I cannot remember how many times I changed settings, created and reloaded brains the last two days. Aaaah, and another thing I found during the process - one cannot save a brain named with numbers. It gives ARTCODE 9991 and shutdowns MACH when the brain is enabled. This was another hard moment, which took me quite a time to realize.

Thanks again!

Todor

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
fun times
Re: New Pokeys 56 Modbus config with MACH
« Reply #8 on: April 29, 2011, 05:45:54 PM »
Hi

The whole thing is getting quite funny to configure. Now I cannot access outputs through MACH3. They work with the PK soft anyway.

Another strange thing is that I assigned two buttons via Brain to JOG X + and JOG X -, but whenever I push any of them it starts jogging continuously till I hit reset. Did I miss something about this?

Thanks
Re: New Pokeys 56 Modbus config with MACH
« Reply #9 on: April 30, 2011, 03:24:06 AM »
Hi, an update for the outputs problem. If for some reason one or more of the outputs starts inactive, say the LED connected to it is OFF, when I do a write to some of the output-coils addresses all outputs go active. Then write does not work to bring them inactive.

I guess something is not enabled somewhere to be able to write to an output. Yes, I have checked read/write options for the DIGITAL I/O on the PK soft. Any ideas?