MB2HAL error

More
14 Dec 2019 15:19 #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?

File Attachment:

File Name: custom_postgui.hal
File Size:1 KB

File Attachment:

File Name: custom.hal
File Size:5 KB

File Attachment:

File Name: machine.ini
File Size:6 KB

File Attachment:

File Name: mb2hal.ini
File Size:6 KB
Attachments:

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

More
16 Dec 2019 16:05 - 16 Dec 2019 16:09 #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
Last edit: 16 Dec 2019 16:09 by 0x2102.
The following user(s) said Thank You: DC67

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

More
16 Dec 2019 16:51 - 16 Dec 2019 16:53 #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.
Last edit: 16 Dec 2019 16:53 by DC67.

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

More
19 Dec 2019 07:39 #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 or Create an account to join the conversation.

More
20 Dec 2019 13:43 #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

File Attachment:

File Name: custom_2019-12-20.hal
File Size:6 KB

File Attachment:

File Name: custom_pos...2-20.hal
File Size:1 KB

File Attachment:

File Name: mb2hal_2019-12-20.ini
File Size:6 KB
Attachments:

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

More
20 Dec 2019 14:53 #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.)
The following user(s) said Thank You: DC67

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

More
20 Dec 2019 18:54 #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.
The following user(s) said Thank You: DC67

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

More
21 Dec 2019 10:15 #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 or Create an account to join the conversation.

More
22 Dec 2019 17:39 - 22 Dec 2019 17:47 #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



Attachments:
Last edit: 22 Dec 2019 17:47 by DC67.

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

More
22 Dec 2019 18:29 - 22 Dec 2019 18:32 #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
Last edit: 22 Dec 2019 18:32 by Mike_Eitel.
The following user(s) said Thank You: DC67

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

Time to create page: 0.272 seconds
Powered by Kunena Forum