yalang yl620 VFD rs485/modbus communicaiton

More
02 Nov 2021 20:24 #225031 by mBender
I used the manual which was provided earlier in this thread. Started translating (with google translate) a bit more, added some information to the manual which helped me understanding the registers,...
Finaly I created a github repository and hope I can get a nice integration working. Hopefully I get some support, because some of the items on the roadmap, I have no clue how to get this working with LinuxCNC. However a start is made and when I am back home, I will continue testing and adding feedback to this thread.

github.com/xsnoopy/LinuxCNC-Yalang-yl620-VFD-rs485-Modbus

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

More
05 Nov 2021 23:50 #225450 by mBender
So I made some good progress. But I have a few problems:
1. I can't get the pyvcp tab to show a float number. If I format it as u32 or s32 it works, but the same setting with float won't work.
2. I can't vfdmod to work to write the parameter registers.

All updates are on github.

I played around with classic latter and was able to get at least the simple communication working. But no matter what I try I can't get the set up right for reading or writing the registers. Is there somewhere a better manual as on linuxcnc.org ?

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

More
08 Nov 2021 14:01 #225690 by Todd Zuercher
What trouble(s) are you having with reading or writing the registers?

The manuals on Linuxcnc.org are pretty much all there is. Depending on what your problems are there could be undocumented options that are not fully supported in CL's gui (but you may be able to still access them by manually editing the configuration files by hand.) I think I was able to do that with some of the com settings when I was testing Modbus with CL. Ultimately I was not able to make CL work for my application and ended up using Mb2hal for my application (controling 8 VFDs on a gang router.) My problem was that CL limited the number of register transactions I could read and write to (I needed 32 separate transactions and I think CL can only do 16.) But I could still control half of them. If the Modbus control of the VFDs I was using had been set up differently with contiguous registers that could have been combined into single read and write transactions so that I could have used 2 transactions per drive instead of 4 (one read and 3 separate writes), I could have made CL work.

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

More
09 Nov 2021 23:37 #225897 by andypugh
There might be something here: sites.google.com/site/classicladder/
But I suspect that the linuxCNC version of CL and the original version have probably diverged.

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

More
12 Nov 2021 00:35 #226165 by mBender
Sorry for my late response. Didn´t had much time to continue working on the integration.

So my problem with the pyvcp is that I can read out float numbers from the VFD for example the maximum HZ which I put for testing reasons to 399.9 HZ. I can see the number in the HAL but as soon as I connect the pins to a pyvcp, LinuxCNC won´t start anymore. If I get a second I will upload my code.

With the vfdmod, I can read the parameter register, but I can not write them. So I thougt it might be a good idea to use Classic Ladder, since I have a modbus relais platine as well which I wanted to use parallel.

So I started the integration of the VFD with the CL. I came to the point that I get the basic communication running and make the Error Bit for Modbus working and not working running. So my bus is working. My next step was to read out the registers. But no matter what I tried, I never got it sucessfully working. Part of the issue is that I don´t know how long the registers are, what type of reading I should use and so far and so on.

Meanwhile another user was able to upload an english manual to Github, so I have a complete description. I am sure I get it working as soon as I have figured out how to read out one of the registers. But I am not at that point and any help is greatly appreciated.

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

More
12 Nov 2021 07:21 #226196 by andypugh

So my problem with the pyvcp is that I can read out float numbers from the VFD for example the maximum HZ which I put for testing reasons to 399.9 HZ. I can see the number in the HAL but as soon as I connect the pins to a pyvcp, LinuxCNC won´t start anymore. If I get a second I will upload my code.
 

PyVCP has different number display boxes for float, int and unsigned int:
linuxcnc.org/docs/2.8/html/gui/pyvcp.html#_number_displays
I suspect that you are trying to connect a flat HAL pin to an integer  PyVCP display widget. 
 

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

More
23 Nov 2021 02:59 #227360 by mBender
That worked.

I am continuing to work on the integration and started a new threat in HAL Examples. forum.linuxcnc.org/47-hal-examples/44328...mod-or-classicladder

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

More
16 Jun 2022 20:27 #245286 by tcurdt
I've also gotten stuck with the RS485 communication.
I've set the YL620A to
P00.01    3    controlled by RS485
P03.00    3    baud, 3=9600, 4=19200
P03.01    1   id
P03.02    2    8 1 None
P03.03    3    RS485 communication error, 0=decelerate to stop, 3=non-stop
P07.08  5   freq controlled by RS485

And since debugging inside linuxcnc was another layer of complexity I tried connecting via mbpoll:
$ mbpoll -r 8192 -b 9600 -P none -t 3:hex /dev/ttyUSB0mbpoll 1.0-0 - FieldTalk(tm) Modbus(R) Master SimulatorCopyright © 2015-2019 Pascal JEAN, https://github.com/epsilonrt/mbpollThis program comes with ABSOLUTELY NO WARRANTY.This is free software, and you are welcome to redistribute itunder certain conditions; type 'mbpoll -w' for details. Protocol configuration: Modbus RTUSlave configuration...: address = [1]                        start reference = 8192, count = 1Communication.........: /dev/ttyUSB0,       9600-8N1                        t/o 1.00 s, poll rate 1000 msData type.............: 16-bit register, input register table -- Polling slave 1... Ctrl-C to stop)Read input register failed: Connection timed out

I also switched the A/B.

Anyone of the YL620 mental support group that could help out with some idea or advice here?

cheers,
Torsten

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

More
18 Jun 2022 20:00 #245405 by MarkoPolo
I also have yl620a, I have the following:
P00.01    3    controlled by RS485
P03.00    4    baud, 3=9600, 4=19200
P03.01    1    id
P03.02    2    8 1 None
P03.03    0    RS485 communication error, 0=decelerate to stop, 3=non-stop
P07.08    5    freq controlled by RS485

on the /dev /ttyUSB0 port and speed 19200 I check the first 1200 addresses with this command

root@debian:/#  for i in {0..1200}; do mbpoll -b 19200 -1 -P none -v -1 -t 4 -r $i /dev/ttyUSB0; done 2>/dev/null |grep \[[0-9]\]: 2>&1
[1]:     3998
[2]:     3
[3]:     0
[4]:     0
[5]:     4000
[6]:     4000
[7]:     1000
[8]:     400
[9]:     100
[10]:     40
[11]:     10
[12]:     100
[13]:     0
[14]:     0
[15]:     0
[16]:     1
[17]:     0
[18]:     1

if that doesn't work then I suspect the problem is with the physical connection

Marek
The following user(s) said Thank You: tcurdt

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

More
13 Aug 2022 11:19 #249641 by DavidE
Let me preface this post with, I am completely new to LinuxCNC so go easy on me please : )

I am hoping someone can help me. I am trying to get my YL620 VFD talking through VFDMOD. I have partial success. RS485 shows as connected. I can start in forward or reverse and stop the spindle. However I am unable to control the speed in any way. Either GCODE or with the + and - buttons in Axis. At start up my spindle speed is set to 100hz, as I set it in the ini, and that's where it stays no matter what I do.

I have attached all the config files, if anyone is able to help me to get this working I would be eternally grateful! I am at the point of pulling my hair out. 

I have tried ClassicLadder and MB2HAL as well with zero success. The closest I have got is VFDMOD. That being said I would be happy with getting any method working at this point. 

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

Time to create page: 0.270 seconds
Powered by Kunena Forum