LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multiple counters on the same serial COM port through an M-BUS

Solved!
Go to solution

Hi, please has anyone here ever used Labview to read data from multiple counters on the same serial COM port through an M-BUS? I want to read data from 3 counters. I have already managed to build a program to read 2 counters but when I try to read all 3 I either don't get data for some counters or the data is not accurate.

0 Kudos
Message 1 of 4
(146 Views)

Hi 

 

In my opinion the internal while loops are unecessary, as they run only once. 

 

I'm assuming by sending the proper command, the Serial device interprets what counter you are reading. 

You can just send the serial commands one after the other. 

 

One solution would be : 

1 create a subvi that sends serial commands and reads the response. 

2 implement a for loop sending for each counter at a time. 

3 You will receive an array of responses corresponding to each counter. 

 

* Make sure that there is enough time between each counter to respond properly. 

0 Kudos
Message 2 of 4
(136 Views)

@Boris.BA wrote:

Hi, please has anyone here ever used Labview to read data from multiple counters on the same serial COM port through an M-BUS? I want to read data from 3 counters. I have already managed to build a program to read 2 counters but when I try to read all 3 I either don't get data for some counters or the data is not accurate.


The simpler solution (if redesign is an option) might be to have three explicit COM ports.  If it's a desktop, there are cards that have anywhere from 1 to 16 or more COM ports.  If it's a laptop, maybe three USB to RS-232 serial adapters?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 4
(110 Views)
Solution
Accepted by topic author Boris.BA

Yes, you are right. The internal While loops only execute once. I now use a first For loop with 3 iterations and an internal Case structure for each counter. The Loop Iteration gives the Case Selector. So for each Loop Iteration, a counter will be read.

 

Thank you for your solution idea.

Download All
0 Kudos
Message 4 of 4
(43 Views)