LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Small Car Management Application Using Clusters

I want to create a small car management application using clusters. This application will allow users to add, delete, save, and modify car information via clusters. Each cluster contains the brand (string), color (string), year of release (integer > 0), and user rating out of 20 (decimal) for a car. The graphical interface includes a cluster for entering data, a table to display the list of cars, and buttons "Add", "Modify", "Delete", and "Save" to manage the data. The functionalities allow users to add a car to the table, modify its information, delete it, and save the list in a CSV file. For example, a user can enter "Ford, Blue, 2020, 17.8", click "Add" to insert it into the table, and then modify or delete this entry later.

0 Kudos
Message 1 of 7
(293 Views)

@amsba88 wrote:

I want to create a small car management application using clusters. This application will allow users to add, delete, save, and modify car information via clusters. Each cluster contains the brand (string), color (string), year of release (integer > 0), and user rating out of 20 (decimal) for a car. The graphical interface includes a cluster for entering data, a table to display the list of cars, and buttons "Add", "Modify", "Delete", and "Save" to manage the data. The functionalities allow users to add a car to the table, modify its information, delete it, and save the list in a CSV file. For example, a user can enter "Ford, Blue, 2020, 17.8", click "Add" to insert it into the table, and then modify or delete this entry later.


Shouldn't you include medium and large cars as well?  😄

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 2 of 7
(290 Views)

So build your cluster, already.  You might consider not using Strings in any of your cluster elements (like "Ford", "Buick", "Honda") but create a Type (called, say, "Cars") that is an Enum, whose elements are called "Ford", "Buick", "Honda", etc.  Same with "Color", or other named Attributes.  Saves typing and writing "Toyuta" by mistake ...

 

Bob Schor

Message 3 of 7
(263 Views)

I have started to work on the example, but I cannot understand how to proceed. Who can help me? Here is the example:

I want to create a small car management application using clusters. This application will allow users to add, delete, save, and modify car information via clusters. Each cluster contains the brand (string), color (string), year of release (integer > 0), and user rating out of 20 (decimal) for a car. The graphical interface includes a cluster for entering data, a table to display the list of cars, and buttons "Add", "Modify", "Delete", and "Save" to manage the data. The functionalities allow users to add a car to the table, modify its information, delete it, and save the list in a CSV file. For example, a user can enter "Ford, Blue, 2020, 17.8", click "Add" to insert it into the table, and then modify or delete this entry later.

0 Kudos
Message 4 of 7
(218 Views)

Make your cluster into a Type Def so any changes is synched to all places if you need to change it (like changing the Brand to an Enum). Build array is better than Insert into array. The reason it's broken because you for some reason have made a 2D array when it should be a 1D.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 7
(186 Views)

The 'Add' section is not functioning properly and adequately. I kindly ask for your assistance in completing this example.

Download All
0 Kudos
Message 6 of 7
(142 Views)

Hi amsba,

 


@amsba88 wrote:

The 'Add' section is not functioning properly and adequately.


Please define "not functioning properly" and "adequately"…

 


@amsba88 wrote:

I kindly ask for your assistance in completing this example.


  • When you want to append an element to an array you should use BuildArray instead of InsertIntoArray.
  • You should keep the data of "Table cars" in a shift register (tight to the outer loop)!
  • When you want to read the actual data of the input cluster then you should OBEY DATAFLOW and read the cluster inside the event case…
  • The Add button terminal should be placed inside the event case (as I guess it is set to a latching mechanical mode)…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 7
(137 Views)