-
Posts
231 -
Joined
-
Last visited
-
Days Won
27
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by Porter
-
Thanks for taking the time for review my code! I was originally thinking about doing something fancy with the PDU inside of the ADU but decided that it was better to let the PDU deal with itself. I agree there is no reason to have it in the ADU class. The simplification that I made to the RTU serial read was to cheat by having the "build PDU request" function calculate the expected number of data bytes of the PDU response. This way the RTU serial read procedure doesn't depend on timeouts or the function code. The downside of this is that when implementing new function codes, you need to remember to set the NumBytes parameter of the PDU request properly otherwise RTU serial read will not produce the expected response. This is why I was tempted to encapsulate the PDU in a class instead of a cluster. However, to make it easier to add functionality, I agree that it's a better idea make the PDU a cluster. Implementing a new function code is simply a matter of creating a VI that calls Querry.vi with the correct parameters. I've prepared an update with the following changes: Converted MB_PDU class to cluster Removed RTU inter-frame wait time optimization in TX ADU. It may have caused problems when sharing the serial port. Renamed NumBytes of MB_PDU to RTU_DataBytes Split interpret response VI of PDU into 3 VIs to handle different message types Set build and interpret VIs of PDU to private Removed function VIs from MB_Master class Removed PDU_req and PDU_resp from the MB_ADU class
-
Version V1.3.6
1,313 downloads
This package contains the Plasmionique Modbus Master library for LabVIEW. It supports RTU, ASCII and TCP modes with the following function codes: 0x01 - Read Coils 0x02 - Read Discrete Inputs 0x03 - Read Holding Registers 0x04 - Read Input Registers 0x05 - Write Single Coil 0x06 - Write Single Register 0x07 - Read Exception Status 0x0F - Write Multiple Coils 0x10 - Write Multiple Registers 0x16 - Mask Write Register 0x17 - Read/Write Multiple Registers 0x2B/0x0E - Read Device Identification Other features include: - Sharing a COM port across multiple Modbus sessions using VISA locks (10 second timeout). - Sharing a Modbus session across multiple communication loops. - TCP transaction ID handling to ensure that requests and responses are matched up correctly in case responses are received out of order. - Modbus Comm Tester, available through the "Tools->Plasmionique" menu, for testing communication with a slave device without writing any code. - Detailed help document available through the "Help->Plasmionique" menu. Examples are included in "<LabVIEW>\examples\Plasmionique\MB Master\": MB_Master Comm Tester.vi: Demonstrates usage of API to open/close connection and communicate with a Modbus slave device. MB_Master Multiple Sessions.vi: Demonstrates usage of API to open concurrent Modbus sessions. MB_Master Simple Serial.vi: Demonstrates polling of a single input register over serial line. Download a copy of the user guide here: MB_Master - User Guide.pdf Note that Version 1.3.4 of this library has been certified compatible with LabVIEW and has been released on the LabVIEW Tools Network: http://sine.ni.com/nips/cds/view/p/lang/en/nid/214230 The most recent version of this library will always be released on LAVA first before going through NI's certification process. ***This project is now available on GitHub: https://github.com/rfporter/Modbus-Master -
View File Plasmionique Modbus Master This package contains the Plasmionique Modbus Master library for LabVIEW. It supports RTU, ASCII and TCP modes with the following function codes: 0x01 - Read Coils 0x02 - Read Discrete Inputs 0x03 - Read Holding Registers 0x04 - Read Input Registers 0x05 - Write Single Coil 0x06 - Write Single Register 0x07 - Read Exception Status 0x0F - Write Multiple Coils 0x10 - Write Multiple Registers 0x16 - Mask Write Register 0x17 - Read/Write Multiple Registers 0x2B/0x0E - Read Device Identification Other features include: - Sharing a COM port across multiple Modbus sessions using VISA locks (10 second timeout). - Sharing a Modbus session across multiple communication loops. - TCP transaction ID handling to ensure that requests and responses are matched up correctly in case responses are received out of order. - Modbus Comm Tester, available through the "Tools->Plasmionique" menu, for testing communication with a slave device without writing any code. - Detailed help document available through the "Help->Plasmionique" menu. Examples are included in "<LabVIEW>\examples\Plasmionique\MB Master\": MB_Master Comm Tester.vi: Demonstrates usage of API to open/close connection and communicate with a Modbus slave device. MB_Master Multiple Sessions.vi: Demonstrates usage of API to open concurrent Modbus sessions. MB_Master Simple Serial.vi: Demonstrates polling of a single input register over serial line. Download a copy of the user guide here: MB_Master - User Guide.pdf Note that Version 1.3.4 of this library has been certified compatible with LabVIEW and has been released on the LabVIEW Tools Network: http://sine.ni.com/nips/cds/view/p/lang/en/nid/214230 The most recent version of this library will always be released on LAVA first before going through NI's certification process. ***This project is now available on GitHub: https://github.com/rfporter/Modbus-Master Submitter Porter Submitted 04/01/2016 Category LabVIEW Tools Network Certified License Type BSD (Most common)
-
Reproduced on LV2013. See attached VI. Changing the Y-scale of the plot during run-time should reproduce the problem. It seems that the cursor's y-scale is not updated until you move the cursor manually. A workaround is to catch the plot attribute change event and update the cursor list manually. I've implemented this in the attached VI. Enable the Fixit? button and then change the plot's Y-Scale and the cursor should snap to the correct scale. The attached VI is saved back to version 2011. Let me know if it works for you. Ok... I can't attach files... Here it is in dropbox: https://dl.dropboxusercontent.com/u/8640811/XY%20Graph%20Bug/XY%20Graph%20Cursor%20Test.vi
-
Version 0.4.0.1 has a LV2013 and LV2012 package available for download. If you are running LV2013 or higher, please use the LV2013 package. I haven't had time to thoroughly test the LV2012 package.
- 16 replies
-
- translation
- localization
-
(and 2 more)
Tagged with:
-
I'm currently adding support for 1D string array controls and constants. I will look into moving to LV 2012 after that.
- 16 replies
-
- translation
- localization
-
(and 2 more)
Tagged with:
-
I figured that it was worth posting about the it here with "Package Not Compatible" in the subject just in case someone encounters the problem when trying to install a package from the code repository. A quick search of the error message on the LAVA forms should bring them here.
- 1 reply
-
- not compatible
- vipm
-
(and 1 more)
Tagged with:
-
I tried to install one of my packages using VI Package Manager 2013 and was surprised to see the error message "This package is not compatible with any LabVIEW version on this computer." The package is supposed to be compatible with any LabVIEW version >= 8.6 and I have 2013 installed. After some Googling, I found this: http://digital.ni.com/public.nsf/allkb/9A84C532AB9268BD86257CEF00794E70 It turns out that I had compiled the package using VIPM 2014 and thus it is not compatible with VIPM 2013. I suppose that this makes sense but the error message shown in VI package manager is very misleading. So in conclusion... Keep VIPM up to date otherwise you might get misleading error messages when trying to install new packages.
- 1 reply
-
- 1
-
- not compatible
- vipm
-
(and 1 more)
Tagged with:
-
I will look into adding this feature. The reason why I made a static language list was because I link the language to its associated code page. I suppose that it would make more sense to store this information in a config file that the user can modify.
- 16 replies
-
- translation
- localization
-
(and 2 more)
Tagged with:
-
Thanks for the suggestion. I've changed the color to orange.
- 4 replies
-
- comparison
- equal
-
(and 1 more)
Tagged with:
-
Added support for SGL and EXT types. Uploaded package to Code Repository: http://lavag.org/files/file/259-floating-point-almost-equal/
- 6 replies
-
- float
- comparison
-
(and 1 more)
Tagged with:
-
Version V1.0.2
593 downloads
This package contains VIs for testing equality of floating point numbers within a specified tolerance. Absolute Epsilon comparison, Relative Epsilon comparison and the ULP comparison have been implemented as described in this blog post by Bruce Dawson: http://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/ Note that the ULP comparison has not been implemented for extended precision floating point type. Installation and instructions: Install VIP package using VI Package Manager 2014. Examples: "<LabVIEW>\examples\LAVA\AlmostEqual\AlmostEqual_Example 1.vi" Demonstrates the usage of all three AlmostEqual functions. "<LabVIEW>\examples\LAVA\AlmostEqual\AlmostEqual_Example 2.vi" Demonstrates a case where exactly equal fails to produce the expected result. Development version available on GitHub: https://github.com/rfporter/FP-Equal- 2 reviews
-
- equal
- flaoting point
-
(and 1 more)
Tagged with:
-
View File Floating Point Almost Equal This package contains VIs for testing equality of floating point numbers within a specified tolerance. Absolute Epsilon comparison, Relative Epsilon comparison and the ULP comparison have been implemented as described in this blog post by Bruce Dawson: http://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/ Note that the ULP comparison has not been implemented for extended precision floating point type. Installation and instructions: Install VIP package using VI Package Manager 2014. Examples: "<LabVIEW>\examples\LAVA\AlmostEqual\AlmostEqual_Example 1.vi" Demonstrates the usage of all three AlmostEqual functions. "<LabVIEW>\examples\LAVA\AlmostEqual\AlmostEqual_Example 2.vi" Demonstrates a case where exactly equal fails to produce the expected result. Development version available on GitHub: https://github.com/rfporter/FP-Equal Submitter Porter Submitted 12/19/2014 Category General LabVIEW Version
- 4 replies
-
- 1
-
- comparison
- equal
-
(and 1 more)
Tagged with:
-
Saved to LV 8.6
- 6 replies
-
- float
- comparison
-
(and 1 more)
Tagged with:
-
Read spreadsheet file with text delimiter
Porter replied to Gepponline's topic in Database and File IO
I wrote Robust CSV for this purpose: http://lavag.org/files/file/239-robust-csv/ Just specify the delimiter as Tab. -
Thanks for the info. MGI's solution looks somewhat like the relative epsilon solution proposed in Bruce Dawson's blog post however they use a fixed maximum relative difference of 1%. Perhaps in some cases that would be too high. Altenbach's version looks identical to the AlmostEqual2sComplement() function described in another article by Bruce Dawson: http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm Notice at the top of that article he states that you should not be using that method of comparison as it has a couple of major flaws. For example, comparing 2 and -2 will always return true. I have added the relative epsilon comparison to the package for completeness. This way, you can try all 3 methods if you are interested. Most of the time I really only need the absolute epsilon comparison because I know beforehand what range of values I'm comparing.
- 6 replies
-
- float
- comparison
-
(and 1 more)
Tagged with:
-
The other day I encountered a situation where I wanted to test if two floating point values were equal. Of course, one of the first things that you are told about floating point values is that you should never test for exact equality. So I proceed to wire up: Is X = Y +/- some acceptable tolerance? And that worked perfectly for my use case. That is, I knew that the max. value was 1000 and the min value was 0 and the resolution (or increment) was 0.01. A tolerance of 0.001 was sufficient. This got me thinking. Wouldn't it be nice to have some reusable VIs for testing if floating point values are almost equal? Unfortunately this meant taking a broader view of the problem and lead me to this interesting blog post: http://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/ I've attached VIs for the Absolute Epsilon comparison, Relative Epsilon comparison and the ULP comparison described in the blog post for double precision floating point values. Perhaps this would be a nice addition to the somewhat barren OpenG Comparison Pallet? Uploaded package to Code Repository: http://lavag.org/files/file/259-floating-point-almost-equal/ AlmostEqual_LV2013.zip AlmostEqual_LV86.zip
- 6 replies
-
- float
- comparison
-
(and 1 more)
Tagged with:
-
I've thrown together a user manual. Its included in the Documentation folder of the latest version (V 0.3.3). You can also grab a copy here: https://dl.dropboxusercontent.com/u/8640811/SET%20Toolkit%20-%20User%20Manual.pdf
- 16 replies
-
- translation
- localization
-
(and 2 more)
Tagged with:
-
Strings supported as of version 0.3.1: Front Panel - Custom Title Front Panel Decoration Text - All Block Diagram String Constants (Not located within a structure) - Extracted if Label Visible - Labeled String Constants within Labeled Clusters will be extracted. - Block Diagram Array Strings currently not supported. All front pane Controls - Visible Captions - Tip Strips Boolean Controls - Visible Boolean Text Ring Controls - Item Strings String Controls - Default Value Run-Time Menus - Item Name if Item Tag doesn't start with APP
- 16 replies
-
- translation
- localization
-
(and 2 more)
Tagged with:
-
Some important things to note: - The source posted is actually for LabVIEW 2013. - Version 0.3 is an alpha release. Expect to encounter bugs. - Make sure that you add "UseUnicode=True" to the LabVIEW.ini file and restart LabVIEW before running the program.. - To start the program, run the "Launcher.vi" located in the "SET Language Editor" folder.
- 16 replies
-
- translation
- localization
-
(and 2 more)
Tagged with:
-
Version V 0.4.0
1,493 downloads
The SET Localization Toolkit provides more convenient edit-time language switching support for LabVIEW 2013 projects. UI text is extracted from an existing project and stored in a localization file. Additional languages can be added then applied to the project using the apply language wizard. The idea is to be able to quickly apply a language to a project before distribution. Applying the language at edit-time allows you to fix up the UI in the target language. Change fonts and re-size controls so that it looks right before compiling it. Features: - No modification of project's source code required. No additional dependencies. - Support for switching code pages. - Ability to define shared resources. - Resources referenced via UID. Changing labels of control does not break linkage. - Resources can be exported to CSV file for external translation. - Resources stored as UTF-16LE text. - Ability to translate RTM files. Requirements: - Unicode support enabled in the LabVIEW.ini file Installation: - Download the ".vip" file and install using VI Package Manager 2014 - Make sure that "UseUnicode=True" is set in the "labview.ini" file Usage: - From within any LabVIEW window, select "Tools->LAVA->SET Project Editor" GitHub: https://github.com/rfporter/SET-Toolkit- 3 reviews
-
- localization
- translation
-
(and 2 more)
Tagged with:
-
View File SET Localization Toolkit The SET Localization Toolkit provides more convenient edit-time language switching support for LabVIEW 2013 projects. UI text is extracted from an existing project and stored in a localization file. Additional languages can be added then applied to the project using the apply language wizard. The idea is to be able to quickly apply a language to a project before distribution. Applying the language at edit-time allows you to fix up the UI in the target language. Change fonts and re-size controls so that it looks right before compiling it. Features: - No modification of project's source code required. No additional dependencies. - Support for switching code pages. - Ability to define shared resources. - Resources referenced via UID. Changing labels of control does not break linkage. - Resources can be exported to CSV file for external translation. - Resources stored as UTF-16LE text. - Ability to translate RTM files. Requirements: - Unicode support enabled in the LabVIEW.ini file Installation: - Download the ".vip" file and install using VI Package Manager 2014 - Make sure that "UseUnicode=True" is set in the "labview.ini" file Usage: - From within any LabVIEW window, select "Tools->LAVA->SET Project Editor" GitHub: https://github.com/rfporter/SET-Toolkit Submitter Porter Submitted 09/21/2014 Category *Uncertified* LabVIEW Version License Type
- 16 replies
-
- 3
-
- translation
- localization
-
(and 2 more)
Tagged with:
-
I've posted the (modified) read CSV along with write CSV VIs as a package in the Code Repository: http://lavag.org/files/file/239-robust-csv/
-
Version V1.2.0
1,480 downloads
This package contains VIs for reading and writing to CSV files that follow the CSV format outlined in RFC-4180 (see http://tools.ietf.org/html/rfc4180). Using this package, you can properly import CSV files that were exported from spreadsheet programs such as Microsoft Excel, Open Office or LibreOffice Calc as well as export CSV files that will be compatible with any program capable of interpreting CSV files. This implementation of the CSV format is capable of handling escaped fields such as those containing commas (or other field delimiters), multiple lines, and double quotes. Notes: - Starting from V1.1.0, library files are located in "<LabVIEW>\vi.lib\LAVA\Robust CSV" and example is located in "<LabVIEW>\examples\LAVA\Robust CSV". Development version available on GitHub: https://github.com/rfporter/Robust-CSV- 1 review
-
- csv
- delimited text
-
(and 3 more)
Tagged with:
-
View File Robust CSV This package contains VIs for reading and writing to CSV files that follow the CSV format outlined in RFC-4180 (see http://tools.ietf.org/html/rfc4180). Using this package, you can properly import CSV files that were exported from spreadsheet programs such as Microsoft Excel, Open Office or LibreOffice Calc as well as export CSV files that will be compatible with any program capable of interpreting CSV files. This implementation of the CSV format is capable of handling escaped fields such as those containing commas (or other field delimiters), multiple lines, and double quotes. Notes: - Starting from V1.1.0, library files are located in "<LabVIEW>\vi.lib\LAVA\Robust CSV" and example is located in "<LabVIEW>\examples\LAVA\Robust CSV". Development version available on GitHub: https://github.com/rfporter/Robust-CSV Submitter Porter Submitted 02/21/2014 Category Database & File IO License Type BSD (Most common)