ProductInfoForLV 1.0.1

dotnet add package ProductInfoForLV --version 1.0.1                
NuGet\Install-Package ProductInfoForLV -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ProductInfoForLV" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ProductInfoForLV --version 1.0.1                
#r "nuget: ProductInfoForLV, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ProductInfoForLV as a Cake Addin
#addin nuget:?package=ProductInfoForLV&version=1.0.1

// Install ProductInfoForLV as a Cake Tool
#tool nuget:?package=ProductInfoForLV&version=1.0.1                

ProductInfoForLV

Take advantage of General SQLite Op COM

Also for LabVIEW use

This library is written in .Net Framework 4.8, built as for X64 platform.

A LabVIEW version provided in this package. The developing LabVIEW is of x86 version in LabVIEW Q2023.

You can send me email to tell which versions you want.

The infrastructure is in PowerPoint (in attached file ProductInfoStructure.pptx)

The source code of LabVIEW project is provided, which demonstrates how to use this library (ProductInfoForLV.dll).

Also, the source code of the whole library ProductInfoForLV and the unit test is provided too.

This library just exports limited functions like below:

  1. Open
  2. Close
  3. ClearAllData
  4. RetrieveMultiple
  5. RetrieveSingle
  6. GetRecordCount
  7. Insert
  8. InsertOrUpdate
  9. DeleteBySql
  10. ExecuteNonQueryDirectly
  11. CheckBarcodeMatchs

The previous 10 functions just operate the table Products using GeneralSQLiteOp_v2.COM.dll (a necessary COM component), and use JSON string to represent the Product data struct since there are difficulties to convert data between LabVIEW and .Net. The last function is used in factory automation frequently, the scenario is that factory clients always scan a product to test or production and required to check if the bar code of the product is valid or invalid. This function assumes clients can make a barcode rule very simplified like this:

  1. %Y, this means Year4, like 2023
  2. %y, this means Year2, like 23
  3. %M1, this means MonthNoPadding, 1 or 2 characters, like 9 (September)
  4. %M2, this means Month2, like 09 (September)
  5. %d, this means DayNoPadding, 1 or 2 characters, like 8 (day 8 of a month)
  6. %D, this means Day2, like 08 (day 8 of a month)
  7. %D8, this means Date8, this is a combination of %Y%M2%D, like 20231123
  8. %H, this means Hour, 2 characters, in factory automation, no body use 1 character width
  9. %m, this means Minute
  10. %s, this means Second
  11. %T6, this is a combination of %H%m%s, like 083859
  12. %DT, this is a combination of %D8%T6, full date time like 20231123083859
  13. %Fixed:ABC%%, from this format, it gets difficult, this means a fixed string ABC. In factory production, most products will have some fixed text in the barcode like the code of the facility.
  14. %VarChar:12%%, this means some variable text with width (here it is 12) will be presented
  15. %VarNumber:9%%, this means some number with width (here it is 9) will be presented
  16. %Any, this means any text from this location will be presented, so this should be the last item in the rule.

If user wanted to set rule of barcode check, then set Product. CheckBarcodeRule = true, and set Product.BarcodeRule = @"%DT%Fixed:Oh my god:?%%%VarChar:2%%%VarNumber:3%%%Any".

Currently, users can only call CheckBarcodeMatchs to manually check if it really matches or not.

Hereafter you can look through the Word document ProductInfo.docx to understand how the tool works

One more thing, if you want to make it work, the prerequisite is to call regasm.exe to register the 3 COM components. Fortunately, I developed install.ps1 in sub folder ‘install’, you call run it in PowerShell, also I wrote install.bat to execute install.ps1, so you can run it instead.

Author

Patrick Gamp

Published date

November 23, 2023

Product Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.8

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 511 11/23/2023
1.0.0 148 11/23/2023

Forgot to attach LabVIEW source code, docx and pptx, now present