Modbus in ClassicLadder doesn´t work

More
31 May 2019 16:10 #135480 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

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

More
31 May 2019 23:55 #135511 by andypugh
Does the usb port show up as a serial port in /dev ?

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

More
01 Jun 2019 09:34 #135551 by MATZE-ATZE-SCH
Hey,

there show up a file called "ttyusb0", when I plug in the Stick.
Is this the right one?

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

More
01 Jun 2019 10:00 - 01 Jun 2019 13:26 #135554 by MATZE-ATZE-SCH
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
Last edit: 01 Jun 2019 13:26 by MATZE-ATZE-SCH.

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

More
01 Jun 2019 22:52 - 01 Jun 2019 22:55 #135592 by Grotius
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.
Attachments:
Last edit: 01 Jun 2019 22:55 by Grotius.

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

More
02 Jun 2019 00:24 #135601 by MATZE-ATZE-SCH
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

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

More
02 Jun 2019 00:37 #135603 by tommylight

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

Yeah, that need read and write permissions while they are normally set to read only.

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

More
02 Jun 2019 18:20 #135650 by andypugh
I think .so / .ko depends on kernel (RTAI) or uspace (preempt-rt) real-time flavour rather than 32/64 bit.

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

Time to create page: 0.093 seconds
Powered by Kunena Forum