Control of an Omrom MX2 VFD via RS485 USB-adaptor
- Domsku
-
Topic Author
- Offline
- New Member
-
- Posts: 17
- Thank you received: 1
When I start the spindle by pushing the buttons of the front panel of the MX2, I get the correct values for OmronMX2.VFDActualFrequency.00.
Does anyone have an idea what could be the problem with my setup?
Please Log in or Create an account to join the conversation.
- bbsr_5a
- Offline
- Platinum Member
-
- Posts: 544
- Thank you received: 105
the omron can do 3 Way controlling BUT only one at the TIME
1 Buttons
2 Vin / Fwd
3 RS485
We got a omron that has to be 3Pin controlled so one needs to be blocked high/GND see documentation
Please Log in or Create an account to join the conversation.
- Domsku
-
Topic Author
- Offline
- New Member
-
- Posts: 17
- Thank you received: 1
Actually, during the last hours I found out that the frequency control via modbus already works. So there is just left the problem with the run comand.
When I look at the "number of errors" of the run command (and also of the direction command) in hal, I get about 10 errors per second.
Please Log in or Create an account to join the conversation.
- bbsr_5a
- Offline
- Platinum Member
-
- Posts: 544
- Thank you received: 105
so it is just to use the linuxcnc component
wj200-vfd.N.commanded-frequency RPM
wj200-vfd.N.reverse (1 = REV, 0 = FWD)
wj200-vfd.N.run (1 = run, 0 = stop)
wj200-vfd.N.enable 1= on
Please Log in or Create an account to join the conversation.
- Domsku
-
Topic Author
- Offline
- New Member
-
- Posts: 17
- Thank you received: 1
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
- Posts: 23271
- Thank you received: 4929
I tryed the wj200 driver. However it does not work with the USB-adaptor.
Did you pass it the address of the USB adaptor?
loadusr wj200_vfd --device=/tty/usb0
Or similar. It is understandable if you didn't because the documentation does not mention this.
Please Log in or Create an account to join the conversation.
- Domsku
-
Topic Author
- Offline
- New Member
-
- Posts: 17
- Thank you received: 1
forum.linuxcnc.org/49-basic-configuratio...aptor?start=0#155094
I am so close making it run with mb2hal and I realy like the flexibility of mb2hal. I can read out much more registers than the wj200 driver does. As I said, I can already control the spindle speed. Just missing the run an direction command.
In the hal window I can see the number of errors I receive from the run-command (10 per second). Is there a way of reading out an error message?
Please Log in or Create an account to join the conversation.
- bbsr_5a
- Offline
- Platinum Member
-
- Posts: 544
- Thank you received: 105
and ofcause to your INFO the RS485 are soposed to be in a POSTGUI File
NOT inside the Main Machine HAL File
as comunication outside the Interpreter main loop BASE is only to be there
use of SERVO tread and outside Hardware communication shoudt always be setup that way
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
- Posts: 23271
- Thank you received: 4929
and ofcause to your INFO the RS485 are soposed to be in a POSTGUI File
NOT inside the Main Machine HAL File
as comunication outside the Interpreter main loop BASE is only to be there
The only things that _need_ to be in the Postgui files are references to HAL pins that are created by the GUI (and hence won't exist until the GUI has loaded)
Please Log in or Create an account to join the conversation.
- Domsku
-
Topic Author
- Offline
- New Member
-
- Posts: 17
- Thank you received: 1
Thanks Andy for your advices, using mb2hal was a verry good suggestion. Even though I'm not able to write coils for some reason. I tryed the --device option in all kinds of variation for the wj200 driver this morning once again. It still did not work. I saw on github that jamwaffles added this feature somewhen in 2016. I actually installed my linuxcnc in 2017. Maybe the update was not yet in my distribution.
I attached my custom.hal and mb2hal.ini in case someone has a use for it.
Please Log in or Create an account to join the conversation.