LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HOW AND WHERE TO INSERT EVENT STRUCTURE IN PRODUCER/CONSUMER LOOP FOR DATA LOGGING?

What are you think, could I use this example for my project, using produce (event) loop and 2 consumer loops with queues?

0 Kudos
Message 11 of 28
(1,044 Views)

Hi,

  1. Under this link Using a Queued Message Handler in LabVIEW - NI, section "Example QMH Program", got show how to open example in the Labview.
  2. Your "1 producer+2 consumers" also consider good template for your project. Because it already fulfilled Event structure as producer condition.
  3. Don't worry QMH just for your references. You know what's the requirement of your project, so I think it's better to let you decide which one is more suitable to apply.
  4. In simple, my opinion is, as long as event structure in producer loop, then your GUI can be designed.
0 Kudos
Message 12 of 28
(1,032 Views)

If you have, maybe, some useful example of User Interfaces because I really have many problems with it?

0 Kudos
Message 13 of 28
(1,019 Views)

In my knowledge, the QMH is the most suitable example of User interface which consists data logging and graph indicator, that's why i suggest to you.

You can wait others people suggestions too.

0 Kudos
Message 14 of 28
(990 Views)

Hi people,  

I am student and I dont have many experience in Labview. 

I have made my program that will log measurements from the inverters (7 inverters and all collected measurements need to be saved on a 15-minute basis in separate csv files for each day). The inverters have integrated Modbus TCP servers and are supported for communication using the MODBUS TCP / IP communication protocol. I have made it in producer/consumer loop.

 

But now I need to develop GUI which consist of a main screen on which it will be possible to select measurements from an individual power plant inverter or total measurements for the entire power plant. 

 

My idea is to update my program which is in producer/consumer loop to QMH loop where I can develop GUI. But I have problems, because I don't know how exactly to do it? If someone can help me, I would really appreciate that!

 

 

 

0 Kudos
Message 15 of 28
(993 Views)

Hi guys, I am new in LabVIEW yet, so I need help. I need to read 7 inverters (and I need to read 7 measurements form every inverter - temperature, power, voltage, etc...). 

 

I developed this simple sub VI for reading inverters, but I am not sure that this is right way. What are you think and what's your advice how to make this more efficient or better?

 

Thank you,

Mc

Download All
0 Kudos
Message 16 of 28
(890 Views)

Hi mc,

 


@mc50100 wrote:

I developed this simple sub VI for reading inverters, but I am not sure that this is right way. What are you think and what's your advice how to make this more efficient or better?


  • It seems you are reading the very same register for all 7 Modbus-Read requests, as there always the parameters are set to "0". Is this the right way to read 7 different values from your devices?
  • You don't need the shift register with its BuildArray node: use an autoindexing tunnel instead…
  • Do you need to keep the error for each device seperately (using this array of error clusters) - or would a scalar error cluster be good enough? There doesn't seem to be a special error handling afterwards…
  • Do you really need the "7" constant at the loop "N" input? You already use autoindexing at the TCP ref array tunnel…
  • No need for FormatDateTimeString: you can use a timestamp indicator with a simple GetDateTimeInSeconds function…
  • There are several coercion dots visible in the producer loop: this can lead into problems, especially at the TCP reference array wire…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 17 of 28
(877 Views)

Hi,

 

1. I haven’t gotten all the measurement addresses yet so I’ve just left it like this for now. But each inverter will have its own addresses for individual measurements, so maybe I need to make Case structure for each inverter or?

I correct your items (2-6), thank you for advice!

Download All
0 Kudos
Message 18 of 28
(874 Views)

Hi mc,

 


@mc50100 wrote:

I haven’t gotten all the measurement addresses yet so I’ve just left it like this for now. But each inverter will have its own addresses for individual measurements, so maybe I need to make Case structure for each inverter or?


In this case I would use an 2D array, holding the 7 register addresses for each of the 7 inverters. Then you can use an inner FOR loop to autoindex over all elements of that 2D array…

 

Btw. I also suggestest to also remove the 2nd BuildArray (connected to the shift register)! No need to prepend an empty array before each 2D subset! That array constant before the loop will now prevent any Modbus readings at all - THINK DATAFLOW combined with autoindexing behaviour of the loop…

 

One more comment: when you read single registers you don't need to create a 2D array from values of one inverter. An 1D array from scalar register values would be sufficient, too!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 19 of 28
(862 Views)

hi,

 

I have tried all your tips but I don't know if I understood them well, especially this part:

 

Btw. I also suggestest to also remove the 2nd BuildArray (connected to the shift register)! No need to prepend an empty array before each 2D subset! That array constant before the loop will now prevent any Modbus readings at all - THINK DATAFLOW combined with autoindexing behaviour of the loop…

 

One more comment: when you read single registers you don't need to create a 2D array from values of one inverter. An 1D array from scalar register values would be sufficient, too!

 

I am also little bit confused about output auto-indexing in for loops?

If you can see and say what I need to prepare?

0 Kudos
Message 20 of 28
(853 Views)