09-21-2021 08:09 AM - edited 09-21-2021 08:10 AM
I have a program where I am supposed to measure the RS485 signal using an oscilloscope. For that I need to run a program where there is continous transmission between the master and slave, i.e PC and RS 485 device and also parallely read the data using a picoscope. For this I wrote a seperate program for RS 485 transmission and then run it dynamically. But then when I run the program the parallel dynamic program is running but I am not getting an output, instead I am getting an error -1073807339 for the read holding registers. I try to find out what the error is by running the program in highlight execution, then I am not getting this error and the read holding registers is reading the data. So i try to put in a delay time instead of highlight execution but still no output in modbus read holding registers, instead its just the error -1073807339. What is the reason for this. Kindly do help me thank you. I have attached the program.
Solved! Go to Solution.
09-21-2021 08:58 AM - edited 09-21-2021 09:04 AM
Hi Govindsankar,
hard to debug due to lots of missing subVIs…
There are two different devices used in the RS485 subVI: which of them is giving the error?
You also set several control values in this subVI AFTER you started the VI: I would set as many values as possible before I start the asynchronous subVI…
09-22-2021 08:11 AM
Thank you for your reply. I have figured out the problem. The problem is slave is transmitted from the main VI to the dynamic VI. But before transmitting is complete the program already starts with the defualt slave id and then once it is transmitted, it is too late. The new slave value is given to the slave id constant in the dynamic VI but modbus read is using the default slave id that existed before. So I have changed the program to a condition where the program starts running and waits for the slave id and will only go on to modbus read when the slave id is obtained from the main VI. Thank you.
09-22-2021 10:51 AM
@govindsankar wrote:
Thank you for your reply. I have figured out the problem. The problem is slave is transmitted from the main VI to the dynamic VI. But before transmitting is complete the program already starts with the defualt slave id and then once it is transmitted, it is too late. The new slave value is given to the slave id constant in the dynamic VI but modbus read is using the default slave id that existed before. So I have changed the program to a condition where the program starts running and waits for the slave id and will only go on to modbus read when the slave id is obtained from the main VI. Thank you.
Nice job. Don't forget to mark YOUR post as the solution! 🙂
09-22-2021 11:10 AM
Hi Govindsankar,
@govindsankar wrote:
The problem is slave is transmitted from the main VI to the dynamic VI. But before transmitting is complete the program already starts with the defualt slave id and then once it is transmitted, it is too late.
Isn't this the very same what I wrote in my message before?
You also set several control values in this subVI AFTER you started the VI: I would set as many values as possible before I start the asynchronous subVI…
09-22-2021 12:11 PM
@GerdW wrote:
Hi Govindsankar,
@govindsankar wrote:
The problem is slave is transmitted from the main VI to the dynamic VI. But before transmitting is complete the program already starts with the defualt slave id and then once it is transmitted, it is too late.
Isn't this the very same what I wrote in my message before?
You also set several control values in this subVI AFTER you started the VI: I would set as many values as possible before I start the asynchronous subVI…
Strangely enough, I thought I put that in my reply, but it disappeared. I distinctly remember typing that you should get credit as well. I mentioned "at least a kudos" because I wasn't sure if it was exactly the same.