I’m still quite new to Ignition (using 8.0.17), one of the subjects I’m having troubles with is getting NMEA0183 sentences from a sensor. I guess the sensor is connected as it should as I can use the manufacturer utility to read values and it works. The wiring is through a RS422 Half-Duplex serial interface card into a Hatteland screen (Norwegian marine brand) which has a quite unclear documentation.
Now, I’m trying to get those data into Ignition which is much harder. I did call the sensor manufacturer to make sure that all configurations set with configureSerialPort are correct.
I also looked into those topics here on the forum:
- How to listen serial data without interruption
- readBytesAsString Error
- Help with system.serial.readUntil
I’m trying to validate the code into the script console without much success, here’s the code (I tried system.serial.configureSerialPort and with system.serial.port) :
I should maybe mention that the first line in the interpreter (on the right) doesn’t appear while using with system.serial.port code, probably normal though. I tried reading with either one of the lines in the picture but I couldn’t get any positive results from that.
I tried everything I could think of and I still fall short of a solution. In all I could find about the serial communication scripting on the forum, I did not see much people having issues connecting in the first place so I guess I should ask for help connecting
Can this kind of code be tested in the Script Console?
Thank you very much for your help.