Modbus encoder
- Thayloreing
- Offline
- Senior Member
Less
More
- Posts: 70
- Thank you received: 2
07 Oct 2024 18:42 - 22 Oct 2024 20:21 #311511
by Thayloreing
Modbus encoder was created by Thayloreing
Hello my friends, I have a question, I'm reading the register of an encoder counter via Modbus from a CLP, but I only have the count values in LinuxCNC, I don't have the encoder pins, as I'm using a register I can't link them it in the encoder component, I wanted to know if anyone has ever edited the encoder component to be able to place the value of this register directly into the encoder.n.rawcount pin, so that from this value it would calculate the other values, I believe you would have to transform the encoder.n.rawcount as an input pin s32 for this to work, I looked at the code but I know very little to edit it, I tried but got a lot of errors, could you help me?
Last edit: 22 Oct 2024 20:21 by Thayloreing.
Please Log in or Create an account to join the conversation.
- bkt
- Offline
- Platinum Member
Less
More
- Posts: 1201
- Thank you received: 103
25 Oct 2024 20:14 #313230
by bkt
Replied by bkt on topic Modbus encoder
have you used mb2hal? in my opinion (if you share encoder datasheet is better) you can have only rawcount in modbus ... and maybe z index ... maybe too directions .... so you can read alm0ost 3 register ....
regards
regards
Please Log in or Create an account to join the conversation.
- Thayloreing
- Offline
- Senior Member
Less
More
- Posts: 70
- Thank you received: 2
28 Oct 2024 00:15 #313341
by Thayloreing
Replied by Thayloreing on topic Modbus encoder
It's a 100ppr abz encoder, I'm reading these pulses via mb2hal through a CLP, as I only have the increment and decrement value in the register, it doesn't have the other functions that it would have if I used the Linuxcnc encoder component, and I can't link it this encoder component with the value of the register that I am reading, because in the encoder component there is only a way to link the A B Z pins, but I only have the values of the register that counts pulses, my idea was to modify the encoder component to be able to accept the link between this register and the component to supply the other pins, my idea was to make the rawcount an input pin on the encoder component, and from then on it does all the calculations in these areas so that it obtains the values of the rest of the component's pins encoder, but I don't know how to implement this idea, my knowledge of c is very limited, I put it here to see if anyone could help me, I'm using a parallel port, in Brazil purchasing a mesa card is not so easy to acquire, and the price more than doubles, that's why I use a clp, in my use I don't need these calculations to be done in real time, I'm aware that the mb2hal is not in real time, but I need some pins of the encoder component with the register to follow my project
Please Log in or Create an account to join the conversation.
Time to create page: 0.115 seconds