MB2HAL error

More
6 years 10 months ago #152649 by DC67
MB2HAL error was created by DC67
Hello
Im trying to setup my VFD (Sourcetronic ST500) to use Modbus RS485. I'll found another User who got a Powtran that is the same VFD (only an other label) His VFD is working on Linuxcnc 2.7 so i want to rewrite his config for my Linuxcnc 2.8 to get it to work. My problem is if i want to load it in an terminal like "halcmd loadusr -Wn st500 mb2hal config=mb2hal.ini ,iam gettin an error. " unable to open INI file [mb2hal.ini]. All hal + config files are in same folder. What is my mistake?

Attachment not found

Attachment not found

Attachment not found

Attachment not found

Please Log in to join the conversation.

More
6 years 10 months ago #152749 by 0x2102
Replied by 0x2102 on topic MB2HAL error
Hello,

just to be sure...in the Terminal you went into your machine directory and then executed:

1.) halrun
2.) halcmd loadusr -Wn st500 mb2hal config=mb2hal.ini

Please Log in to join the conversation.

More
6 years 10 months ago #152758 by DC67
Replied by DC67 on topic MB2HAL error
THIS SIR! Thank you. I tested the handwheel XHC-WH04b after compile with the console which worked. I did not notice that I had to switch to the config directory for the VFD because of the mb2hal.ini file to start the whole thing with the console.
Now i can see the error`s after using show pin.Now i hope i can sort this out to get this VFD work with Linuxcnc 2.8.

Please Log in to join the conversation.

More
6 years 10 months ago #152900 by DomCa
Replied by DomCa on topic MB2HAL error
Hi DC67,

I have the same VFD.
Could you report here on your progress and post updates files. I would be very interested!!

Big thanks
Domca

Please Log in to join the conversation.

More
6 years 10 months ago #152942 by DC67
Replied by DC67 on topic MB2HAL error
Hi
I'm currently still stuck. I can display the VFD pins in the terminal, so linuxcnc can theoretically access the VFD. The problem is that when loading the mb2hal.ini the VFD hangs in a loop.The config and hal file are still being processed. Would be good if someone could give me a hint where I have to start or what I have to change for Linuxcnc 2.8

Attachment not found

Attachment not found


Attachment not found

Attachment not found

Attachment not found

Please Log in to join the conversation.

More
6 years 10 months ago #152947 by Todd Zuercher
Replied by Todd Zuercher on topic MB2HAL error
Looks like a comunication error. It could be a physical problem, with the wiring or termination, a configuration problem with in the drive, or wrong settings in Linuxcnc. (really just about any thing.)

First thing to do is research you drive's manual to see how to configure it for modbus control (most drives require you to set several parameters to enable it), and find out what it's port settings are/should be (baud rate, slave id, parity bits, stop bits, data bits, register addresses...). Then you need to make sure that you've setup Mb2hal to use those exact same settings.

I found it was easier to test modbus communication with my drives using Classicladder and make sure they worked, before I set up Mb2hal. (In fact I probably would have preferred to just use CL if It could have handled twice as many transactions as it does.)

Please Log in to join the conversation.

More
6 years 10 months ago #152965 by 0x2102
Replied by 0x2102 on topic MB2HAL error
Make sure that the user has access (rights) to /dev/ttyUSB0

1.) Verify with "ls -lFA /dev/ttyUSB0" (read write rights)
2.) If not done already, add your user to the dialout group -> "sudo usermod -a -G dialout $USER"
3.) Use a tool like ModPoll to verify that all communication is working before you move on to LinuxCNC
4.) Verify wiring (+ to + / - to -), Slave-ID, Baud Rate / Bits / Parity etc. I would start with 9600 8N1

www.modbusdriver.com/downloads/modpoll.tgz

ModPoll Example:

modpoll -b 9600 -p none -a 1 -m rtu -r 32768 -c 10 /dev/ttyUSB0

Once that is working move on to LinuxCNC. Change debug=3 for MB2HAL and each transaction to get more debug information.

Please Log in to join the conversation.

More
6 years 10 months ago #152991 by DC67
Replied by DC67 on topic MB2HAL error
At first ty for the hints.
Im gonna check this out and give response later.

Please Log in to join the conversation.

More
6 years 10 months ago #153052 by DC67
Replied by DC67 on topic MB2HAL error
I tested the settings with Modpoll and I am a little confused about my VFD. My VFD is not responding to Modpoll. In the pictures I marked the setting from the manual for Modbus and the current setting for Modbus on the VFD. A screenshot is from Modpoll. Maybe some have a Powtran or Sourcetronic and can send me a setup that works with Modbus for comparison.I can use the USB cable from the manufacturer to make settings from a PC with software purchased from the manufacturer. So the cable should drop out as an error.As soon as I have solved this problem, I will report how the setup in the HAL continued. Merry Christmas

Attachment not found


Attachment not found


Attachment not found


Attachment not found

Please Log in to join the conversation.

More
6 years 10 months ago #153054 by Mike_Eitel
Replied by Mike_Eitel on topic MB2HAL error
You are running on wrong speed use 6006 ( modbus is on last digit)
Mike

P. S.
2 ms wait could be a bit short to. If you get some tines errors try to increase that time

Please Log in to join the conversation.

Time to create page: 0.095 seconds
Powered by Kunena Forum