- Posts: 51
- Thank you received: 0
Modbus in ClassicLadder doesn´t work
- MATZE-ATZE-SCH
- Topic Author
- Offline
- Senior Member
-
Less
More
7 years 4 months ago #135480
by MATZE-ATZE-SCH
Modbus in ClassicLadder doesn´t work was created by MATZE-ATZE-SCH
Hey,
I have just Updated to Debian Stretch, the 32bit version.
But now, the Modbus doesn´t work anymore.
The Hardeware seems ok, under Windows I can comunicate with the Hosts.
But in Linuxcnc I get an communication error.
Any suggestions? The USB-Rs485 is listed, when I enter a command prompt with "lsusb"
The same I´ve got when testing the 64bit version of stretch.
Best regards
Marcel
I have just Updated to Debian Stretch, the 32bit version.
But now, the Modbus doesn´t work anymore.
The Hardeware seems ok, under Windows I can comunicate with the Hosts.
But in Linuxcnc I get an communication error.
Any suggestions? The USB-Rs485 is listed, when I enter a command prompt with "lsusb"
The same I´ve got when testing the 64bit version of stretch.
Best regards
Marcel
Please Log in to join the conversation.
7 years 4 months ago #135511
by andypugh
Replied by andypugh on topic Modbus in ClassicLadder doesn´t work
Does the usb port show up as a serial port in /dev ?
Please Log in to join the conversation.
- MATZE-ATZE-SCH
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 51
- Thank you received: 0
7 years 4 months ago #135551
by MATZE-ATZE-SCH
Replied by MATZE-ATZE-SCH on topic Modbus in ClassicLadder doesn´t work
Hey,
there show up a file called "ttyusb0", when I plug in the Stick.
Is this the right one?
there show up a file called "ttyusb0", when I plug in the Stick.
Is this the right one?
Please Log in to join the conversation.
- MATZE-ATZE-SCH
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 51
- Thank you received: 0
7 years 4 months ago #135554
by MATZE-ATZE-SCH
Replied by MATZE-ATZE-SCH on topic Modbus in ClassicLadder doesn´t work
Had looked in the Internet for solutions and found this:
First I needed to uninstall brltty. This seems to interfere the ttyUSB0.
Then I had to open the console and enter
sudo chmod a+rw /dev/ttyUSB0
then it worked...
Does someone know, what was wrong?
Best regards
Marcel
First I needed to uninstall brltty. This seems to interfere the ttyUSB0.
Then I had to open the console and enter
sudo chmod a+rw /dev/ttyUSB0
then it worked...
Does someone know, what was wrong?
Best regards
Marcel
Please Log in to join the conversation.
7 years 4 months ago #135592
by Grotius
Replied by Grotius on topic Modbus in ClassicLadder doesn´t work
I have just Updated to Debian Stretch, the 32bit version.
If you did that, you are a long time in the past my friend. 32 and 64 is just factor 2.
brltty is not a common used program or code. Sure not for linuxcnc.
The attached code is a example how to connect modbus to linuxcnc in python, the main script for starting up linuxcnc.
Attached also a hyperterm powermax modbuss connection, provided by the indian.
If you did that, you are a long time in the past my friend. 32 and 64 is just factor 2.
brltty is not a common used program or code. Sure not for linuxcnc.
The attached code is a example how to connect modbus to linuxcnc in python, the main script for starting up linuxcnc.
Attached also a hyperterm powermax modbuss connection, provided by the indian.
Please Log in to join the conversation.
- MATZE-ATZE-SCH
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 51
- Thank you received: 0
7 years 4 months ago #135601
by MATZE-ATZE-SCH
Replied by MATZE-ATZE-SCH on topic Modbus in ClassicLadder doesn´t work
Hey Grotius,
ok, so I should update to 64 bit?
brltty was already installed with the Image of LinuxCNC, in both versions, the 32bit Image and the 64bit Image. With this installed, I didn´t get the ttyUSB0 in /dev, but after deinstall this, the ttyUSB0 showed up. But don't now why, the brltty seems for people who needs a braille attachment.
Ok, with python I have absolute no experience...
Do you think, with python it is easier to set up modbus in linuxcnc then in classicladder? The only reason I need modbus is for reading out the load on the servo drives...
Best regards
Marcel
ok, so I should update to 64 bit?
brltty was already installed with the Image of LinuxCNC, in both versions, the 32bit Image and the 64bit Image. With this installed, I didn´t get the ttyUSB0 in /dev, but after deinstall this, the ttyUSB0 showed up. But don't now why, the brltty seems for people who needs a braille attachment.
Ok, with python I have absolute no experience...
Do you think, with python it is easier to set up modbus in linuxcnc then in classicladder? The only reason I need modbus is for reading out the load on the servo drives...
Best regards
Marcel
Please Log in to join the conversation.
- tommylight
-
- Offline
- Administrator
-
Less
More
- Posts: 22010
- Thank you received: 3
7 years 4 months ago #135603
by tommylight
Replied by tommylight on topic Modbus in ClassicLadder doesn´t work
Yeah, that need read and write permissions while they are normally set to read only.MATZE-ATZE-SCH wrote: Had looked in the Internet for solutions and found this:
First I needed to uninstall brltty. This seems to interfere the ttyUSB0.
Then I had to open the console and enter
sudo chmod a+rw /dev/ttyUSB0
then it worked...
Does someone know, what was wrong?
Best regards
Marcel
Please Log in to join the conversation.
7 years 4 months ago #135650
by andypugh
Replied by andypugh on topic Modbus in ClassicLadder doesn´t work
I think .so / .ko depends on kernel (RTAI) or uspace (preempt-rt) real-time flavour rather than 32/64 bit.
Please Log in to join the conversation.
6 years 8 months ago #157216
by Hortensie
Replied by Hortensie on topic Modbus in ClassicLadder doesn´t work
I just documented basic modbus ladder with my RS-485 12V relay channel switch. You might check this page
github.com/Hortensie/CNC_x_axis_linuxcnc...er-and-RS-485-Switch
Please Log in to join the conversation.
Time to create page: 0.115 seconds
