UART error with holding registers
Posted: Tue Mar 28, 2023 12:36 am
Hi,
I made a program that sends a command to a device, the device returns a string that is cleaned and put into a holding register. I am doing this to get three different strings.
The issue I am having is that after I get the model number from the device the other items I get from the device (serial number and ch4) take a while to show up on the hold register and will update a couple of times. I want all variables to be constantly updating. It must be something in my logic but I haven't a clue. I am calling the devices from the inspectra model. I hope I made sense with my issue. Feel free to ask.
I have attached my code below
Thank you,
I made a program that sends a command to a device, the device returns a string that is cleaned and put into a holding register. I am doing this to get three different strings.
The issue I am having is that after I get the model number from the device the other items I get from the device (serial number and ch4) take a while to show up on the hold register and will update a couple of times. I want all variables to be constantly updating. It must be something in my logic but I haven't a clue. I am calling the devices from the inspectra model. I hope I made sense with my issue. Feel free to ask.
I have attached my code below
Thank you,