MB2HAL error

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.
The following user(s) said Thank You: DC67

Please Log in or Create an account 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 or Create an account to join the conversation.

More
6 years 10 months ago - 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



Last edit: 6 years 10 months ago by DC67.

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

More
6 years 10 months ago - 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
Last edit: 6 years 10 months ago by Mike_Eitel.
The following user(s) said Thank You: DC67

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

More
6 years 10 months ago - 6 years 10 months ago #153140 by DC67
Replied by DC67 on topic MB2HAL error
I'm gettin ahead.At first i changed baud rate (thx to mike for that hint) then I got connected but gettin a checksum error.Trying out change decimal from 4097 described in the manual to 4098 I got the frequency displayed in modpull .Frequency changes are shown in Terminal if i turn pots on VFD. I have to add all the decimal numbers I need by 1 digit for whatever reason it works(linuxcnc start counting decimal 0 or 1?)Just wonder whats wrong here. I still get a loop error when I call mb2hal.ini in hal terminal.


log file from loop error

File Attachment:

File Name: log.txt
File Size:12.3 KB
Last edit: 6 years 10 months ago by DC67.

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

More
6 years 10 months ago #153159 by zajc3w
Replied by zajc3w on topic MB2HAL error
Looks like halrun/mb2hal is missing write rights to /dev/ttyUSB0
modpoll works because you're running it as sudo.
The following user(s) said Thank You: DC67

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

Time to create page: 0.201 seconds
Powered by Kunena Forum