Jump to content
News about the LabVIEW Wiki! Read more... ×

Porter

Members
  • Content Count

    139
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by Porter

  1. 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  
  2. Just in case anyone is still interested, the source is now available on github: https://github.com/rfporter/SET-Toolkit
  3. Porter

    SET Localization Toolkit

    Version V 0.4.0

    1,414 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
  4. NI Labs Modbus API is now on GitHub! Password protection of VIs has been removed. https://github.com/NISystemsEngineering/LabVIEW-Modbus-API
  5. It should show an error on every subsequent read... but it doesn't: It just keeps going as if nothing is wrong.
  6. His code has not fixed the issue yet. It does catch the error, as did Plasmionique Modbus Master, but it is up to you to catch the error and reset the connection. If you don't reset the connection, this can happen: Yikes! No errors being reported and read register 0 is returning the value for register 1. Tanner's proposed fix works. I implemented it in the Plasmionique Modbus Master. With it you can have multiple pending transactions. The responses will be matched up with the requests using the transaction ID. TCP Test.vi
  7. Hah. I didn't see that. I was looking somewhere else. But anyway, I don't see a case where you would only get a LF. In the ASCII protocol, a lone LF should never be sent within the message. And if, for whatever reason, a bit flips to make an LF, then hopefully the error would be caught by failing the CRC check.
  8. For comparison, I copied the CRC calculation from the modbus spec. It's slightly faster (when run on my computer) than your method. I'm not exactly sure why though. And it uses less memory (512Bytes for LUT instead of 131kBytes). crc bench.vi CRC16_Modbus.vi
  9. It is thread safe as long as you use the same instance of serial master when communicating with multiple slaves on the same bus. I finally took a look at the code. I have a couple comments/questions: Serial Shared Components.lvlib->Configure Serial Port.vi: Case structure for number of stop bits. I suggest having some override for this. Maybe have a property node for the stop bits setting. I've come across a number of situations where I have needed RTU with no parity and one stop bit. RTU Data Unit.lvclass->Calculate CRC.vi: I think that there is a more efficient way to calculate the CRC using a lookup table. I'd be happy to share it when I get around to implementing it on Plasmionique Modbus Master. Serial Shared Components.lvlib->Serial Read.vi: I don't like the idea of polling the bytes at port every 8ms. Why not just read the specified number of bytes and let VISA handle the timeout? Serial Shared Components->Serial Read to CRLF.vi: Why not just read until LF (let VISA read take care of this)? ASCII Data Unit.lvclass->Read ADU Packet.vi: Why is start character written to request unit ID of Serial Data Unit? Shouldn't it be the unit ID? IP Data Unit.lvclass->Read ADU Packet.vi: Transaction ID mismatch will discard the packet. What will happen on a noisy network connection with multiple transactions being sent out? See: https://github.com/rfporter/Modbus-Master/issues/1 Why does TCP Master/Slave need Protocol Read to CRLF.vi? TCP_NODELAY.vi: Cool... Was this ever used & tested?
  10. Porter

    VIPM LAVA Repo

    Wouldn't it be nice to have a public LAVA repository for VI package manager? I'm not sure how to make this happen. Just throwing the idea out there.
  11. Porter

    OpenG ini file issues

    I actually still use the OpenG ini library for a lot of my config files. As I recall, it's output was a bit more human-readable compared to the MGI ini format. Recently I've started to look at TOML as a possible replacement: https://github.com/erdosmiller/lv-toml Of course JSON or XML could also work very well but they look a bit more intimidating to the non-technical user.
  12. View File Plasmionique Modbus Master This package contains an open source Modbus master library for LabVIEW. It has been developed by Plasmionique Inc. as a replacement for NI Modbus V1.2.1 and provide an open source alternative to the NI Modbus Community API. 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 Additional Features: Built-in resource locking simplifies the sharing of a serial port with multiple Modbus slaves or sharing a Modbus session across multiple threads. 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. User guide is included in "<LabVIEW>\help\Plasmionique\MB_Master - User Guide.pdf". Modbus COMM tester can be opened from the tools menu under "Tools -> Plasmionique -> Modbus COMM Tester..." 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 LabVIEW Version  
  13. Porter

    [LVTN] Plasmionique Modbus Master

    Plasmionique Modbus Master cannot act as a slave. NI Modbus Library contains a good slave for testing purposes: https://github.com/NISystemsEngineering/LabVIEW-Modbus-API
  14. Version V1.3.4

    1,096 downloads

    This package contains an open source Modbus master library for LabVIEW. It has been developed by Plasmionique Inc. as a replacement for NI Modbus V1.2.1 and provide an open source alternative to the NI Modbus Community API. 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 Additional Features: Built-in resource locking simplifies the sharing of a serial port with multiple Modbus slaves or sharing a Modbus session across multiple threads. 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. User guide is included in "<LabVIEW>\help\Plasmionique\MB_Master - User Guide.pdf". Modbus COMM tester can be opened from the tools menu under "Tools -> Plasmionique -> Modbus COMM Tester..." 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
  15. At the time, I was using the actor framework for a large project. I had multiple com ports and multiple devices on each com port. I decided to have an actor per device. Each modbus device actor would build its own modbus instance from the device's configuration file. Since the modbus instances were thread safe, I didn't have to worry about sharing a com port with multiple devices. Devices on the same com port simply wait in a FIFO queue for the port to be available. I could have instead implemented a modbus master actor and spun up one of these actors per com port. The device actors would then have to send/receive their modbus data through the modbus master actor running on their com port. This way, the modbus master library doesn't need to be thread safe (in terms of shared com port), but I found that it added an extra layer of complexity. I prefer to handle serial communication in my hardware abstraction layer rather than my application layer. Otherwise the device's driver would be tied to the actor framework and would be difficult to reuse for other projects
  16. Porter

    VIPM LAVA Repo

    The idea would be to include the LAVA CR except for non-vip packages and the uncertified section. On LAVA, we used to submit our code to the uncertified section first. Then after some discussion, testing, debugging and polishing, we would report to the moderator that our code is ready to be certified and placed in the appropriate category in the CR. I'm not sure if this is being enforced anymore. The how-to is from 2009:
  17. Porter

    VIPM LAVA Repo

    I think that when a package is hosted in multiple repos, VIPM displays the entry from the most recent package version. So if you release a new version on the LAVA repo, it will show up as an update for the LVTN version. This is definitely not what we want to do. A solution could be to make separate LAVA and LVTN packages. For the LAVA package, you could append _LAVA to the product name and have the LVTN package listed as incompatible. For the LVTN package, have the LAVA package listed as incompatible.
  18. Porter

    [CR] JSONtext

    First of all: Thanks for sharing! Do you plan to implement array slice syntax at some point? For example, $.MyArray[5:20] would return elements 5 to 20 of MyArray.
  19. Porter

    VIPM LAVA Repo

    The projects that I post on LAVA are typically developed on my spare time. They are solutions to problems that I encounter at the office but don't have time to work on during office hours. I post them here because this community is home to some of the most competent LabVIEW architects. What better place to get a decent LabVIEW code review? The result is very good code but not quite polished enough to pass the tools network requirements. The extra time and effort to bring the project through the tools network certification process is just not worth it for me. I'm not making a product for sale. It would be nice though to share these projects with a wider audience. Perhaps in a later version of VIPM, JKI could consider adding support for the LAVA repository (if/when it exists) in their free version. Maybe have an enable checkbox hidden away in a config window. Once enabled, they can display a big warning about how code from LAVA doesn't go through the same certification process as JKI and LabVIEW tools network.
  20. Porter

    [LVTN] Plasmionique Modbus Master

    This is fixed in the latest version (v1.3.3.1) here:
  21. Is anyone interested in releasing an open source Modbus server for Labview?
  22. Porter

    [LVTN] Plasmionique Modbus Master

    In version 1.3.2 the session valid property of the MB Master TCP class was broken. This is fixed in v1.3.3.
  23. Porter

    [LVTN] Plasmionique Modbus Master

    A little bit more testing and tweaking is required. Almost ready for another release though. Here is the preview: mb_master-1.3.2.7.vip Transaction IDs are randomly generated.
  24. Porter

    [LVTN] Plasmionique Modbus Master

    I have implemented transaction IDs for Modbus TCP in the "Transaction ID fix" branch here: https://github.com/rfporter/Modbus-Master/tree/Transaction-ID-Fix Could use some feedback. Here is a vip if you would like to take it for a spin: mb_master-1.3.2.4.vip
×

Important Information

By using this site, you agree to our Terms of Use.