Compiling Altivar VFD Modbus comp

More
11 years 7 months ago #57032 by andypugh

Swapper wrote: i tried running it and sniffing the serial port and its not putting out any data when i start it.


If you send other data to ttyACM0 do you see serial port activity?

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

More
11 years 7 months ago #57033 by fupeama
Hi,
I wrote this program many years ago. Before EMC renames to LINUXCNC.
I had many problems with comunication because only one (from 3) conveter rs232 to rs485 was functional.
I had no success with convert USB to rs485.
At first you can try comercial soft powersuite for ATV to test raw comunication.
I suppose you have setup vfd for modbus comunication. It is describes in file popis.
setup VFD for modbus communication

Drive menu
communication 1.9
modbus network - adress 1
baud rate 38.4
format 8-E-1

command 1.6
ref.1 chanel - modbus
stop key priority - yes
profile - Not separ
ref.2 switching - ch1 active
ref.2 chanel - HMI (Graphic Terminal)
copy channel 1<>2- cmd+ref
F4 key assign - T/K ( you can switch Terminal vs. MODBUS)
HMI cmd. -Bumpless
now you can switch terminal/modbus by F4


you have to set pin enable in LINUXCNC to start read-write loop in program.
pin modbus-ok indicates comunication with atv.
then you can read a write other pins.

sorry for my english :-) I hope you understand what i want to say.
Martin

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

More
11 years 7 months ago #57156 by Swapper

andypugh wrote:

Swapper wrote: i tried running it and sniffing the serial port and its not putting out any data when i start it.


If you send other data to ttyACM0 do you see serial port activity?


Hi
Yes the "mb2hal" component works and i can read values from the VFD without much issue.
The downside of using mb2hal is that there are none of the logic built in that there is in the altivar comp.
Tried getting it to run by writing the hex values to the registers in the manual, not much success since i'm a blunt tool on hex conversions...

i have noticed that the com is not closed correctly when i close halrun it keeps running and i have to kill the process with kill -9 and then halrun -U
Then i can start halrun again, to me that indicates a problem with the code that its "looping" and does not catch a exit.

fupeama:
i have successfully commissioned and tried the VFD with the same USB > R485 converter from a windows computer with the schneider software and i can run/configure stop and so with that.
The altivar comp is doing all those init things when it starts to communicate with the VFD, its also looks like it sets back some values when exeting.

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

More
11 years 7 months ago #57178 by fupeama

Swapper wrote: i have noticed that the com is not closed correctly when i close halrun it keeps running and i have to kill the process with kill -9 and then halrun -U
Then i can start halrun again, to me that indicates a problem with the code that its "looping" and does not catch a exit.


yes this behavior is in case communication is not established.


Now I try make two serial ports connected back to back by socat

socat -d -d PTY: PTY and read ser port in terminal window
sudo cat /dev/pts/3

run atv_vfd comp and I can see comunication from program. (without vfd) only command from atv_vfd.

you can try run atv_vfd with parram -v (verbose) debug information.

I dont remember exactly, but schneider software uses more sofisticated comumication with vfd.
Have you set up vfd for mdb communication?
Martin

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

More
11 years 7 months ago #57182 by Swapper
The port sniffing i have tried, maight not have been exactly like that but i tried with mb2hal and got data in the "sniffer"
When i run the altivar comp i get nothing, its not touching the serialport at all.
i have ran it with -v no difference.

The VFD does have modbus activated since i can read registers with mb2hal component.
That in my world means that serial coms and settings to read the VFD is correct.

Since the VFD comp is changed and compiled against newer linuxcnc software my guess is that something in the modbus lib is wrong and its not able to communicate correctly.

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

More
11 years 7 months ago #57201 by fupeama

Swapper wrote: The port sniffing i have tried, maight not have been exactly like that but i tried with mb2hal and got data in the "sniffer"
When i run the altivar comp i get nothing, its not touching the serialport at all.
i have ran it with -v no difference.

The VFD does have modbus activated since i can read registers with mb2hal component.
That in my world means that serial coms and settings to read the VFD is correct.

Since the VFD comp is changed and compiled against newer linuxcnc software my guess is that something in the modbus lib is wrong and its not able to communicate correctly.


Can you describe sniff method?
I compiled altivar comp on 2.7.0 pre not on 2.8. But I can try it.

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

Time to create page: 0.259 seconds
Powered by Kunena Forum