Hi,
I wonder if making Flowcodes supposedly simpler approach actually made some things harder.
I am no expert on Modbus but if I use Simply Modbus Master I can put a string in and get the expected response. In Flowcode I have absolutely no idea what gives and how to see what it is actually sending and what it is receiving.
I have a Modbus temp / humidity module similar to this https://www.ebay.co.uk/itm/254779819352 ... qrEALw_wcB
In Simply Modbus Master I send a string 01 04 00 01 00 01 20 0B and get a response 01 04 02 01 31 79 74 which is as expected.
In Flowcode I have no idea, the device is responding as far as I am aware but no idea what it is sending.
Is there a way of sending the response buffer and for that matter the sent string to a serial port so I can see what is happening. I did find that if the exact string the device was expecting is not sent it would not respond.
Regards,
Bob
Has Flowcode simplification made things harder
-
- Posts: 283
- http://meble-kuchenne.info.pl
- Joined: Sat Mar 19, 2022 4:53 pm
- Has thanked: 25 times
- Been thanked: 32 times
-
- Matrix Staff
- Posts: 1921
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 623 times
- Been thanked: 645 times
Re: Has Flowcode simplification made things harder
Hi Bob.
To make things easier you can request a component is created for your hardware.
Alternatively, if this is something you would like to sort out yourself, have you seen this wiki page?
To make things easier you can request a component is created for your hardware.
Alternatively, if this is something you would like to sort out yourself, have you seen this wiki page?
Martin
Re: Has Flowcode simplification made things harder
Hi Martin,
I have found an issue with my project so I do not think the device is responding at all.
I think my next step is to dig out a USB/TTL cable to see if my circuit works with that, I know the device works with a USB/RS485 converter but it requires a MAX485 between it and the ESP32 which might be a problem.
I did see that article but as the power monitor (for App developer) was for the ESP32 that seemed to be the best option.
As for creating a component I had hoped to be able to communicate with the device and that would be it. There are only a few addresses that are relevant, here is the info I have on it. https://www.bizkit.ru/wp-content/upload ... -RS485.pdf
Regards,
Bob
I have found an issue with my project so I do not think the device is responding at all.
I think my next step is to dig out a USB/TTL cable to see if my circuit works with that, I know the device works with a USB/RS485 converter but it requires a MAX485 between it and the ESP32 which might be a problem.
I did see that article but as the power monitor (for App developer) was for the ESP32 that seemed to be the best option.
As for creating a component I had hoped to be able to communicate with the device and that would be it. There are only a few addresses that are relevant, here is the info I have on it. https://www.bizkit.ru/wp-content/upload ... -RS485.pdf
Regards,
Bob
Re: Has Flowcode simplification made things harder
Hi Martin,
I am not sure if I am getting anywhere, I have stripped it down to basics, it appears to communicate now as the return parameter for "Read holding register" is 1 now where it was 255 before. One concern is that it stays at 1 even if I disconnect the module data lines.
Here is where I am but have tried everything I can think of. Perhaps it would be an idea if it is possible to create a component if there is nothing obvious missing if that is not too much trouble.
Bob
I am not sure if I am getting anywhere, I have stripped it down to basics, it appears to communicate now as the return parameter for "Read holding register" is 1 now where it was 255 before. One concern is that it stays at 1 even if I disconnect the module data lines.
Here is where I am but have tried everything I can think of. Perhaps it would be an idea if it is possible to create a component if there is nothing obvious missing if that is not too much trouble.
Bob
Re: Has Flowcode simplification made things harder
Hi Martin,
I am getting somewhere and have a suggestion which would have saved a couple of days of messing around with logic analysers etc. The fact my logic analyser does not run under windows 10 made things even worse as I had to keep moving between machines.
Anyway, I digress, the main issue is that there is a bit of a discrepancy as to what functions are called, https://www.simplymodbus.ca/FC02.htm has function FC02 as read input status where Flowcode has it as "Read input register" and then "Read Input register" FC04 which is what I needed is "Read Analog Input" in Flowcode and this is not even in the Flowcode web help from what I could find. I only found this out by changing the code, looking at the logic analyser and then changing until I got the required result. There was also a bit of confusion with the difference where Flowcode starts at 0 which the following suggestion would help, Modbus does not make it easy in the first place.
A suggestion, why not have a box in the configuration which actually shows the message that will be sent, this would have saved me days of hard work. This is done in Simply Modbus Master and made life so much easier when I was struggling to make sure the device originally worked. Amother suggestion would be to have the function in the help text. The issue is still not resolved as it appears the device is not responding, it could be the MAX485 converter which is new to the equation but at least I know Flowcode is now sending the correct string.
Can you please look into if it is possible to create a component as I hope to be using this device more if it is not too much trouble.
Regards,
Bob
I am getting somewhere and have a suggestion which would have saved a couple of days of messing around with logic analysers etc. The fact my logic analyser does not run under windows 10 made things even worse as I had to keep moving between machines.
Anyway, I digress, the main issue is that there is a bit of a discrepancy as to what functions are called, https://www.simplymodbus.ca/FC02.htm has function FC02 as read input status where Flowcode has it as "Read input register" and then "Read Input register" FC04 which is what I needed is "Read Analog Input" in Flowcode and this is not even in the Flowcode web help from what I could find. I only found this out by changing the code, looking at the logic analyser and then changing until I got the required result. There was also a bit of confusion with the difference where Flowcode starts at 0 which the following suggestion would help, Modbus does not make it easy in the first place.
A suggestion, why not have a box in the configuration which actually shows the message that will be sent, this would have saved me days of hard work. This is done in Simply Modbus Master and made life so much easier when I was struggling to make sure the device originally worked. Amother suggestion would be to have the function in the help text. The issue is still not resolved as it appears the device is not responding, it could be the MAX485 converter which is new to the equation but at least I know Flowcode is now sending the correct string.
Can you please look into if it is possible to create a component as I hope to be using this device more if it is not too much trouble.
Regards,
Bob
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 503 times
- Been thanked: 686 times
Re: Has Flowcode simplification made things harder
Hi Bob,
Hopefully sorted for you now here.
viewtopic.php?p=7605#p7605
You can view the bytes that are sent using the console in the simulation if that helps. However probably doesn't help with debugging the embedded problem you're facing here. At least it helps maybe to highlight where differences are creeping in.
Hopefully sorted for you now here.
viewtopic.php?p=7605#p7605
You can view the bytes that are sent using the console in the simulation if that helps. However probably doesn't help with debugging the embedded problem you're facing here. At least it helps maybe to highlight where differences are creeping in.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel