06-16-2025 03:14 AM
Hello everyone,
I am familiar with Labview but quite a beginner with numerical communication.
I will try to summurise my problem.
I use Labview 2018. I want to read the data from an acquisition unit with 7 sensors plug inside.
My program is not perfect but at this stage I succeed to read the 7 sensor with a frequency of 0.5HZ.
So all the parameters seems OK.
When I try to read only two sensors, it reaches 1 HZ.
My last try are about structures, firstly I wanted to read my table with a structure "for" but I try to remove this structure to understand better and to see what's happening ?
I join to my post 3 VI and sub-VI and file result.
Is it possible to reach an acquisition at 1 hz or is the PC to slow to manage 7 sensor at 1 HZ?
Thank you very much,
I stay free for any further information.
Solved! Go to Solution.
06-16-2025 04:32 AM - edited 06-16-2025 04:39 AM
Hi adri,
@adri73 wrote:
Is it possible to reach an acquisition at 1 hz or is the PC to slow to manage 7 sensor at 1 HZ?
It's not your PC that limits the execution speed, it's the way you created your VI!
I see two major issues ("numeric_7sensors"):
Other issues:
"numeric-7sensors-structureFOR" is even worse as you placed the 1s wait inside the FOR loop…
06-16-2025 08:59 AM
Hello GerdW,
Thanks a lot for your quick answer. I am sorry for my code, I try to use all of your tips but I still don't manage the frequency. For now, with the last code I try to read using sequence structure, it does'nt work either, still at 0.5HZ. Your second idea was to replace "read holding register.vi" by "read multiple register.vi" but I couldn't find "read multiple register.vi" there is always the "write and read multiple register.vi", Does this VI exist ?
I think the answer is to use only one modbus tools to read the 7 address, which one i need to use.
Thanks again,
Adri
PS : I am sorry for my code I amnot an Labview architect
06-16-2025 09:56 AM
Hi adri,
@adri73 wrote:
I still don't manage the frequency. For now, with the last code I try to read using sequence structure, it does'nt work either, still at 0.5HZ.
Did I mention "sequence frames" anywhere in my message?
Why do you think using several sequence frames will make your code run faster???
As before: you can read several Modubus registers with just one Read funciton call! That's the way to speed up communication!
I don't have that Modbus library installed on my (current) computer, so you need to read the help for eaxch Modbus function on your own…
@adri73 wrote:
I am sorry for my code I amnot an Labview architect
Me neither…
06-16-2025 10:15 AM
You need to replace read-register(sous-VI).vi with one of these and read multiple registers at once:
Then, convert your data and keep the stuff that you are interested in, ending up with something like this:
reading multiple modbus registers and converting to float
06-17-2025 01:21 AM
Thanks a lot for your help and your time.
I will try as you say.
Regards,
Adrien Bonnefoy