Serial port communication module

Hello,

First, you guys will have to excuse me. I’m pretty new to ignition and to module development (I’ve only been working in ignition for about 3 or 4 weeks now, and have only been working with module development for about 2 weeks now).

I have been working through trying to write a module to communicate with a batch of bar code scanners. The bar code scanners are all usb, they are programmed to communicate with RS 232 serial over USB. I have tried a few different modules to communicate with them but I couldn’t get any of them to work so now I’m trying to make a module myself. I am using a library called jSSC (java-simple-serial-connector), a google code library, to work with the communications.

I have successfully gotten the shell of the module completed. It loads into ignition just fine, we’re running 7.7, and I can drag the component out into the screen. the properties all show up that I added and all that, however when I put in any code to try to utilize the jSSC library I get an exception in the console (Exception in thread “AWT-EventQueue-0” java.lang.StackOverflowError). I can paste the whole exception into pastebin or something if it will help. The exception says that its bugging out on the lines that utilize the jssc library and the it also shows it bugging out on the inside of the library as well.

I would say that its trying to run the code on the server, but I’m currently working on my localhost and I’m not entirely sure what else to try. All of the code I’ve tried putting in I’ve put into the client project. there is no code in the design project and I don’t have a gateway project. One other thing I didn’t understand, that might have something to do with it, is in module.xml I had to add the design project to the scope of the jssc library jar in order for the module to work, otherwise it would just shoot off errors about the library not being found, even though there is no code for it in the design project.

Thanks for the help in advance.

1 Like

I figured out the issues that I was having. I accidentally made a circular reference. I have successfully got my module mostly working, with one exception that I’m not entirely sure whats causing it.

I have my module installed into my localhost, and I can go into the designer, the module loads fine, I can get the data I need with it, I can change the data in the properties for the component that my module creates, and doing so triggers the appropriate actions in the module that I’m looking for. However, when I try to launch the project, either on my computer or on another computer thats on my network, I get an error that doesn’t show up while running the project in the designer.

Here is the error:

If anyone has any ideas I would be extremely grateful for any assistance. I’ve exhausted anything I can think of.

1 Like