Modbus Help - MB2HAL

More
03 Sep 2015 20:40 #62086 by racedirector
Replied by racedirector on topic Modbus Help - MB2HAL
Had to make a few adjustments but all is good so far. Just incase anyone else is watching this with an X200 here are the changes

==== CODE BELOW - for formatting ====
loadusr -Wn x200 mb2hal config=x200vfd.ini

setp x200.direction.00 1 This doesn't seem to work, got to figure this one out

loadrt scale count=1
addf scale.0 servo-thread

scale.0.gain = 0.16666667

net spindle-speed scale.0.in <= motion.spindle-speed-out
net x200-freq x200.frequency.00 <= scale.0.out

net x200-run x200.run.00 <= motion.spindle-on
net x200-dir x200.direction.00 <= motion.spindle-reverse <- This is weird, the spindle actually goes CLOCKWISE when M3 is called. Another one to work out

net x200-at-speed x200.at-speed.00 <= motion.spindle-at-speed

========

It turns out the X200 frequency range under ModBus is 0 to 4000 as it accepts values in increments of 0.1Hz so above at 12000 / 0.16666667 = 2000.00004 which the VFD reads as 200.000004Hz.

As for the direction issue I am workin on it :)

Cheers

Please Log in or Create an account to join the conversation.

More
03 Sep 2015 20:47 #62087 by LearningLinuxCNC
That is what I get for trying to write HAL of the top of my rusty brain. Glad you were able to interpret what I meant. Not what I typed. :silly:
The following user(s) said Thank You: racedirector

Please Log in or Create an account to join the conversation.

More
03 Sep 2015 20:56 #62089 by racedirector
Replied by racedirector on topic Modbus Help - MB2HAL

That is what I get for trying to write HAL of the top of my rusty brain. Glad you were able to interpret what I meant. Not what I typed. :silly:

Hahaha, whats in your rusty brain far exceeds what I know about HAL. Thanks for the leg up!

Please Log in or Create an account to join the conversation.

More
03 Sep 2015 21:27 #62093 by racedirector
Replied by racedirector on topic Modbus Help - MB2HAL
net x200-dir x200.direction.00 <= motion.spindle-reverse

I think I understand why this is so.....

motion.spindle-forward is an OUT BIT and when M3 is called, it goes TRUE or 1. When that was getting sent to my X200 VFD direction coil it was telling the VFD to run CCW as CCW = 1 and CW = 0. Using motion.spindle-reverse in the way I am using it, when M3 is called it goes to FALSE or 0 and the is correct for my VFD.

Truth be known no one else knows anyway as it is buried in my HAL file :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.098 seconds
Powered by Kunena Forum