Hello Guest it is December 12, 2019, 02:58:21 PM

Author Topic: Analog input using modbus device  (Read 3666 times)

0 Members and 1 Guest are viewing this topic.

Analog input using modbus device
« on: June 20, 2006, 04:11:08 PM »
Hello,

I noticed some people did use analog inputs with a (modbus) plc (brian? :) )
I am planning to use a modbus (coupler or plc). How does this work exactly.
I did check out the wiki pages on modbus, but it's not all clear to me.
If my analog modules are 8 bits, do i lose 8 oemtrigger inputs  or so?
are is it better to use direct access in scripting.
What i want to do is use an hall efect 3 axis joystick for jogging.
any hints?

Thanks,
Kris
Logic takes you from A to B, imagination takes you anywhere
Re: Analog input using modbus device
« Reply #1 on: June 20, 2006, 08:14:43 PM »
To get the data from the analog input you look at the input register. So an analog register is read by Mach3 and is stored by Mach 3 till the next time mach3 reads the register. To get the data from the register you do the following:

 Getinput(64)

64 is the first register that you can use for an analog input register.

If it is an 32bit or 8 bit analog is going to change the max valuse that you get from the analog input...

hope that helps
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: Analog input using modbus device
« Reply #2 on: June 21, 2006, 03:31:31 AM »
Hello Brian,
Yes this helps, thank you.
Altough i'm not completely shure of what to do when more analog values are needed.
Say it was an 8-bit register, do i need to reed input 72 (=64+8) for the next value,
are does this mapping settings in modbus setup make it so that i need to read input 65
that is what i think actually.

Kris.
Logic takes you from A to B, imagination takes you anywhere
Re: Analog input using modbus device
« Reply #3 on: June 21, 2006, 07:19:03 AM »
each register is a holding register when you are doing analog. So for a DL05 PLC I know that 10V is 4096 and 0V is 0... so any voltage in that range will be a value in register 64 from 0 - 4096. If you had two analog inputs register 64 & register 65 would have values from 0 - 4096... As you can see it only takes one register to get one analog channel :) .
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: Analog input using modbus device
« Reply #4 on: June 21, 2006, 04:38:51 PM »
Ok, thank you
I was guessing it would be that way
greetings
Logic takes you from A to B, imagination takes you anywhere