From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-11-2014 04:37 PM
Hi everyone and thanks in advance for any help!
I am testing multiple units simultaneously and collecting data from them simultaneously. Each unit has its own COM port and I am using for loop parralism so that I can retrieve data from all units at the same time. All the VIs that use in my for loop are reentrant. The problem I am having is that I need to retrieve data at a rate of 10hz. This works fine with 1-2 units but once I start collecting from 3,4,5,6,....units (up to 24 units), my data rate of 10hz starts to decrease significantly. Why is this happening if each unit has its own com port and memory instance VI to use? Is it the limitation of my computer? If I look at the task manager CPU usage, it is barely using anything. The computer I have is:
Windows XP Professional (2002) SP3
Intel(R) Core(TM)2 Duo CPU
2.93Ghz, 1.96GB of RAM
Any suggestions or advice is greatly appreciated! Thanks!
Note: I am communicating with each unit using rs485
Serge
09-11-2014 04:50 PM
It would help if you posted some code.
09-11-2014 05:23 PM
What is the communication rate? How long are the messages? Are there any delays in the DUTs between receiving data from the computer and sending a response back? What version of LabVIEW?
Lynn
09-11-2014 06:36 PM
Sorry about not posting any code Bill, I assumed that since my program was working with 2 units, the code was not needed.
To answer you questions johnsold:
What is the communication rate? 10 samples/sec
How long are the messages? Send command is about 30 bytes long, receive message is about 50 bytes long
Are there any delays in the DUTs between receiving data from the computer and sending a response back? Not that I know of. The DUTs are designed to communicate at that rate.
What version of LabVIEW? LabVIEW 2011
Hope this helps.
Thanks,
Serge
09-11-2014 07:25 PM
@SergeB wrote:
Sorry about not posting any code Bill, I assumed that since my program was working with 2 units, the code was not needed.
To answer you questions johnsold:
What is the communication rate? 10 samples/sec
How long are the messages? Send command is about 30 bytes long, receive message is about 50 bytes long
Are there any delays in the DUTs between receiving data from the computer and sending a response back? Not that I know of. The DUTs are designed to communicate at that rate.
What version of LabVIEW? LabVIEW 2011
Hope this helps.
Thanks,
Serge
All the MORE reason to post the code. Obviously therein lies some inefficiencies, but we won't know WHAT is inefficient until we get to see something. I learned something after all these years of coding: "Never assume anything." (And yet I always do and always get burned.)
09-11-2014 07:56 PM
Serge,
What is the bit rate (baud) of the RS-485 link?
Lynn
09-11-2014 08:28 PM
09-11-2014 08:28 PM
09-11-2014 09:01 PM
That explains it!
At 19200 baud each byte requires about 521 us. At 80 bytes per DUT you get ~42 ms per DUT. Three units will take more than 120 ms (~8 Hz) to exchange their messages.
24 units * 80 bytes * 10 bits/byte / 100 ms per cycle = 192000 bits/second. And this assumes that there are no delays and no gaps in communications. Realistically, you will need a bit rate 30 to 50% higher than that.
Lynn
09-12-2014 02:05 PM