Using NCD Products with Ignition Scada

The company I work for has been using Ignition SCADA software from Inductive Automation for about a year now. It is extremely powerful with designing custom HMIs, Client screens, etc. I have some equipment that I want to add some vibration and pressure sensors to. Ignition can handle many protocols natively like MODBUS, TCP, UDP, PLC protocols, etc. I also have Ignition setup with Kepware OPC server which offers even more protocols. I’ve been looking into wireless sensors for integration, and it seems that NCD’s wireless sensors coupled with a wireless ethernet modem/gateway would be the trick. I should be able to use Ignition’s TCP driver to communicate over ethernet I think. The modular shields that NCD offers seems like a nice thing to expand into in the future. I want to deal with one company, and question is how to communicate/setup the modular products you offer for Arduino/RaspPi with my software setup. I’m interested in experimenting with your RFID shields, but not sure where to start. Thanks!

Our modular hardware architecture for Arduino/Pi you mentioned is mierly that(modular hardware). The Arduino or Pi is the brain. We offer sample code but the intention is for the user to develop the application layer on the Arduino or Pi that would interface with the hardware and communicate with other outside software if necessary. So long story short that line of hardware requires application development on the given platform(Arduino, Pi, etc).

On the other hand the enterprise wireless sensors like the vibration sensor is intended to be a bit more of an end user product. We are working every day on making it a more complete and simple to use product line by developing more and more sophisticated gateways. Using something like the Ethernet gateway you can establish a TCP socket from your software and parse the data coming back to the gateway, this however will still require an application layer on the external software as it will need to parse the sensor data that comes in. We are developing new gateways which are much more powerful and simpler to interface with.

Hopefully this gives you a bit of an explanation.

Yes this helps my understanding of your product line. Thank you.

@Travis Even though I would never refer to myself as a programmer, I have experience in C, Python, and Assembly languages. Could you supply me with some sample code you referenced, or a link? This will give me a good sense to whether it is something I can handle or not. I will be more apt to use either RaspPi or Arduino. Thanks

Hi,

So the application you described seems to utilize two completely separate lines of products. First is the Enterprise series products here:


Using the Ethernet Gateway there, along with Enterprise sensors should only require application development on the HMI where you would need to parse the data coming in from the sensors over the TCP connection to the Ethernet gateway. This would be higher level programing I assume(Python, JS, etc).
The second thing you mentioned are the RFID scanners. We do not yet have Enterprise RFID scanners although this seems like a very good thing to add to the line(@Bhaskar please chime in there if you like). That said we don’t currently offer them so you would need something like the Raspberry Pi to integrate that. I don’t believe the code development on the Pi would be terribly difficult to develop and you could certainly write it in Python if you decide to go that route. The RFID scanner simply outputs a unique serial number over a serial connection when a tag is detected. You could then use the Pi overlay with XBee interface to send a wireless transmission to the Ethernet gateway in whatever format you see fit. You could do the exact same thing on Arduino, however since this requires two serial interfaces to read the RFID scanner and send the data over XBee I don’t think we have the hardware off the shelf to accomplish that.

Hopefully this gets you started in the right direction.

Thanks for the quick reply. The RFID scanners as an enterprise module would be pretty cool. I noticed on the homepage that you guys list MODBUS as coming soon, would that be applicable to the enterprise sensors? I have MODBUS drivers, and I currently have some AB PLC tags coming in over it, so I know that would work. Okay, so what I think I need to know now is about parsing the data. Is there a way to get some sample data that would come over the TCP/ethernet that would need to be parsed to be useful? I will need to prove that I can handle the data before I can get any purchases approved. If I get this working, I will post my findings here and on the Ignition forum as well. Maybe that will help get you guys some more business.

I have always liked the RFID scanners, and I hope we can release as a enterprise solution this year. I have some ideas, but they are not mature yet…but it’s in the scope for sure. As for MODBUS, we actually have working designs, but they are not released as they require more documentation. We have released to a few customers who need it, we just work with them privately until we are ready for a release.

Also, I am not sure if you have any Windows software development experience, but Visual Studio Community is a free download, and we have source code (Alpha Station) that parses data for all of our sensors at https://ncd.io/alpha

Alpha Station supports serial, USB, RS-485, and Ethernet gateways for our wireless sensors. The parsing code is super simple to review and I can help you understand any part of the source. There is basically one class that is called that parses the data for all NCD sensors and returns the real-world results. I will be more than happy to help if you want to give it a go.

Thanks,
Ryan

Yes please. I’m always up for learning some new techniques. Is the plan to use Alpha Station to parse the data, then pass it on to the Ignition platform, or use Alpha Station as an example of how I can parse the data on my own? I installed Alpha Station on my laptop already. Appreciate it,
Daniel

Hi Daniel,
Alpha is test software, designed to help get you started. It could be modified in any way you want, but basically it serves as a foundation for learning and testing our products. You are free to change it and redistribute as needed.
Ryan

I have AS open inside of Visual Studio, which class is the one you mentioned that parses the incoming data?

Hi Daniel,
The class you need to look at is:
DataFrame = NCDLib.Wireless.S3B_API.SensorDataCapture(NCDComponent1, “None”)

This class is located in the NCDLib (in the solution explorer). NCDLib is pretty big, the code you are looking for in my version starts on line 11890, but this will not be the same on your version of the code. Here is the meat of what you are looking for:

                Select Case rec.SensorType
                    Case 1
                        rec.Description = "Temperature Humidity Sensor"
                        rec.SensorReadings = "Humidity: " + (NCDLib.Math.MSBLSB(data2(0), data2(1)) / 100).ToString
                        Dim CelsiusValue As Decimal = Math.ToSigned16(data2(2), data2(3)) / 100
                        rec.SensorReadings = rec.SensorReadings + " Temperature C: " + CelsiusValue.ToString
                        SensorData.TypeData.Type1.Celsius = NCDLib.Math.TemperatureDegrees(CelsiusValue.ToString)
                        SensorData.TypeData.Type1.Fahrenheit = NCDLib.Math.TemperatureFahrenheit(CelsiusValue)
                        SensorData.TypeData.Type1.Humidity = (NCDLib.Math.MSBLSB(data2(0), data2(1)) / 100).ToString + "%"
                    Case 2
                        rec.Description = "2-Channel Push Notification"
                        rec.SensorReadings = "Input 1: " + data2(0).ToString + "  Input 2: " + data2(1).ToString
                        SensorData.TypeData.Type2.Input1 = data2(0)
                        SensorData.TypeData.Type2.Input2 = data2(1)
                    Case 3
                        rec.Description = "10-Bit 2-Channel ADC"
                        rec.SensorReadings = "ADC 1: " + NCDLib.Math.MSBLSB(data2(0), data2(1)).ToString + "  ADC 2: " + NCDLib.Math.MSBLSB(data2(2), data2(3)).ToString
                        SensorData.TypeData.Type3.ADC1 = NCDLib.Math.MSBLSB(data2(0), data2(1))
                        SensorData.TypeData.Type3.ADC2 = NCDLib.Math.MSBLSB(data2(2), data2(3))
                        SensorData.TypeData.Type3.Voltage1 = NCDLib.Math.MSBLSB(data2(0), data2(1)) * 0.00322265625
                        SensorData.TypeData.Type3.Voltage2 = NCDLib.Math.MSBLSB(data2(2), data2(3)) * 0.00322265625
                    Case 4
                        rec.Description = "Thermocouple Sensor"
                        Dim CelsiusValue As Decimal = Math.ToSigned32(data2(0), data2(1), data2(2), data2(3)) / 100
                        rec.SensorReadings = "Temperature C: " + CelsiusValue.ToString
                        SensorData.TypeData.Type4.Celsius = NCDLib.Math.TemperatureDegrees(CelsiusValue.ToString)
                        SensorData.TypeData.Type4.Fahrenheit = NCDLib.Math.TemperatureFahrenheit(CelsiusValue)
                    Case 5
                        rec.Description = "Gyro/Magneto/Accelerometer/Temperature Sensor"
                        Dim AX As Decimal = NCDLib.Math.ToSigned24(data2(0), data2(1), data2(2)) : rec.SensorReadings = rec.SensorReadings + "Acl X/g: " + (AX / 100000).ToString
                        Dim AY As Decimal = NCDLib.Math.ToSigned24(data2(3), data2(4), data2(5)) : rec.SensorReadings = rec.SensorReadings + " Acl Y/g: " + (AY / 100000).ToString
                        Dim AZ As Decimal = NCDLib.Math.ToSigned24(data2(6), data2(7), data2(8)) : rec.SensorReadings = rec.SensorReadings + " Acl Z/g: " + (AZ / 100000).ToString
                        Dim MX As Decimal = NCDLib.Math.ToSigned24(data2(9), data2(10), data2(11)) : rec.SensorReadings = rec.SensorReadings + " Mag X/dps: " + (MX / 100000).ToString
                        Dim MY As Decimal = NCDLib.Math.ToSigned24(data2(12), data2(13), data2(14)) : rec.SensorReadings = rec.SensorReadings + " Mag Y/dps: " + (MY / 100000).ToString
                        Dim MZ As Decimal = NCDLib.Math.ToSigned24(data2(15), data2(16), data2(17)) : rec.SensorReadings = rec.SensorReadings + " Mag Z/dps: " + (MZ / 100000).ToString
                        Dim GX As Decimal = NCDLib.Math.ToSigned24(data2(18), data2(19), data2(20)) : rec.SensorReadings = rec.SensorReadings + " Gyro X: " + (GX / 100000).ToString
                        Dim GY As Decimal = NCDLib.Math.ToSigned24(data2(21), data2(22), data2(23)) : rec.SensorReadings = rec.SensorReadings + " Gyro Y: " + (GY / 100000).ToString
                        Dim GZ As Decimal = NCDLib.Math.ToSigned24(data2(24), data2(25), data2(26)) : rec.SensorReadings = rec.SensorReadings + " Gyro Z: " + (GZ / 100000).ToString
                        Dim CelsiusValue As Int16 = Math.ToSigned16(data2(27), data2(28)) : rec.SensorReadings = rec.SensorReadings + " Temperature C: " + CelsiusValue.ToString
                        SensorData.TypeData.Type5.Acceleration_Xg = AX / 10000
                        SensorData.TypeData.Type5.Acceleration_Yg = AY / 10000
                        SensorData.TypeData.Type5.Acceleration_Zg = AZ / 10000
                        SensorData.TypeData.Type5.Magneto_Xdps = MX / 10000
                        SensorData.TypeData.Type5.Magneto_Ydps = MY / 10000
                        SensorData.TypeData.Type5.Magneto_Zdps = MZ / 10000
                        SensorData.TypeData.Type5.Gyro_X = GX / 10000
                        SensorData.TypeData.Type5.Gyro_Y = GY / 10000
                        SensorData.TypeData.Type5.Gyro_Z = GZ / 10000
                        SensorData.TypeData.Type5.Celsius = NCDLib.Math.TemperatureDegrees(CelsiusValue.ToString)
                        SensorData.TypeData.Type5.Fahrenheit = NCDLib.Math.TemperatureFahrenheit(CelsiusValue)
                    Case 6
                        rec.Description = "Temperature/Barometeric Pressure"
                        Dim CelsiusValue As Int16 = Math.ToSigned16(data2(0), data2(1)) : rec.SensorReadings = rec.SensorReadings + " Temperature C: " + CelsiusValue.ToString
                        rec.SensorReadings = rec.SensorReadings + " Absolute Pressure: " + (NCDLib.Math.MSBLSB(data2(2), data2(3)) / 1000).ToString
                        Dim RP As Decimal = Math.ToSigned16(data2(4), data2(5)) : rec.SensorReadings = rec.SensorReadings + " Relative Pressure: " + (RP / 1000).ToString
                        Dim DA As Decimal = Math.ToSigned16(data2(6), data2(7)) : rec.SensorReadings = rec.SensorReadings + " Altitude Change: " + (DA / 100).ToString
                        SensorData.TypeData.Type6.RelativePressure = (RP / 1000)
                        SensorData.TypeData.Type6.AltitudeChange = (DA / 100)
                        SensorData.TypeData.Type6.Celsius = NCDLib.Math.TemperatureDegrees(CelsiusValue.ToString)
                        SensorData.TypeData.Type6.Fahrenheit = NCDLib.Math.TemperatureFahrenheit(CelsiusValue)
                    Case 7
                        rec.Description = "Impact Detection"
                        Dim X1 As Decimal = NCDLib.Math.ToSigned16(data2(0), data2(1)) : rec.SensorReadings = rec.SensorReadings + "X1: " + X1.ToString
                        Dim X2 As Decimal = NCDLib.Math.ToSigned16(data2(2), data2(3)) : rec.SensorReadings = rec.SensorReadings + " X2: " + X2.ToString
                        Dim X As Decimal = NCDLib.Math.ToSigned16(data2(4), data2(5)) : rec.SensorReadings = rec.SensorReadings + " X: " + X.ToString
                        Dim Y1 As Decimal = NCDLib.Math.ToSigned16(data2(6), data2(7)) : rec.SensorReadings = rec.SensorReadings + " Y1: " + Y1.ToString
                        Dim Y2 As Decimal = NCDLib.Math.ToSigned16(data2(8), data2(9)) : rec.SensorReadings = rec.SensorReadings + " Y2: " + Y2.ToString
                        Dim Y As Decimal = NCDLib.Math.ToSigned16(data2(10), data2(11)) : rec.SensorReadings = rec.SensorReadings + " Y: " + Y.ToString
                        Dim Z1 As Decimal = NCDLib.Math.ToSigned16(data2(12), data2(13)) : rec.SensorReadings = rec.SensorReadings + " Z1: " + Z1.ToString
                        Dim Z2 As Decimal = NCDLib.Math.ToSigned16(data2(14), data2(15)) : rec.SensorReadings = rec.SensorReadings + " Z2: " + Z2.ToString
                        Dim Z As Decimal = NCDLib.Math.ToSigned16(data2(16), data2(17)) : rec.SensorReadings = rec.SensorReadings + " Z: " + Z.ToString
                        SensorData.TypeData.Type7.X1 = X1
                        SensorData.TypeData.Type7.X2 = X2
                        SensorData.TypeData.Type7.X = X
                        SensorData.TypeData.Type7.Y1 = Y1
                        SensorData.TypeData.Type7.Y2 = Y2
                        SensorData.TypeData.Type7.Y = Y
                        SensorData.TypeData.Type7.Z1 = Z1
                        SensorData.TypeData.Type7.Z2 = Z2
                        SensorData.TypeData.Type7.Z = Z
                    Case 8
                        rec.Description = "Vibration Sensor"
                        Dim RMSX As Decimal = NCDLib.Math.ToSigned24(data2(0), data2(1), data2(2)) : rec.SensorReadings = rec.SensorReadings + "RMS X/g: " + (RMSX / 100000).ToString
                        Dim RMSY As Decimal = NCDLib.Math.ToSigned24(data2(3), data2(4), data2(5)) : rec.SensorReadings = rec.SensorReadings + " RMS Y/g: " + (RMSY / 100000).ToString
                        Dim RMSZ As Decimal = NCDLib.Math.ToSigned24(data2(6), data2(7), data2(8)) : rec.SensorReadings = rec.SensorReadings + " RMS Z/g: " + (RMSZ / 100000).ToString
                        Dim MAXX As Decimal = NCDLib.Math.ToSigned24(data2(9), data2(10), data2(11)) : rec.SensorReadings = rec.SensorReadings + " MAX X/g: " + (MAXX / 100000).ToString
                        Dim MAXY As Decimal = NCDLib.Math.ToSigned24(data2(12), data2(13), data2(14)) : rec.SensorReadings = rec.SensorReadings + " MAX Y/g: " + (MAXY / 100000).ToString
                        Dim MAXZ As Decimal = NCDLib.Math.ToSigned24(data2(15), data2(16), data2(17)) : rec.SensorReadings = rec.SensorReadings + " MAX Z/g: " + (MAXZ / 100000).ToString
                        Dim MINX As Decimal = NCDLib.Math.ToSigned24(data2(18), data2(19), data2(20)) : rec.SensorReadings = rec.SensorReadings + " MIN X/g: " + (MINX / 100000).ToString
                        Dim MINY As Decimal = NCDLib.Math.ToSigned24(data2(21), data2(22), data2(23)) : rec.SensorReadings = rec.SensorReadings + " MIN Y/g: " + (MINY / 100000).ToString
                        Dim MINZ As Decimal = NCDLib.Math.ToSigned24(data2(24), data2(25), data2(26)) : rec.SensorReadings = rec.SensorReadings + " MIN Z/g: " + (MINZ / 100000).ToString
                        Dim CelsiusValue As Int16 = Math.ToSigned16(data2(27), data2(28)) : rec.SensorReadings = rec.SensorReadings + " Temperature C: " + CelsiusValue.ToString
                        SensorData.TypeData.Type8.RMSX = RMSX / 100000
                        SensorData.TypeData.Type8.RMSY = RMSY / 100000
                        SensorData.TypeData.Type8.RMSZ = RMSZ / 100000
                        SensorData.TypeData.Type8.MAXX = MAXX / 100000
                        SensorData.TypeData.Type8.MAXY = MAXY / 100000
                        SensorData.TypeData.Type8.MAXZ = MAXZ / 100000
                        SensorData.TypeData.Type8.MINX = MINX / 100000
                        SensorData.TypeData.Type8.MINY = MINY / 100000
                        SensorData.TypeData.Type8.MINZ = MINZ / 100000
                        SensorData.TypeData.Type8.Celsius = NCDLib.Math.TemperatureDegrees(CelsiusValue.ToString)
                        SensorData.TypeData.Type8.Fahrenheit = NCDLib.Math.TemperatureFahrenheit(CelsiusValue)
                    Case 9
                        rec.Description = "16-Bit Proximity"
                        rec.SensorReadings = "Proximity: " + NCDLib.Math.MSBLSB(data2(0), data2(1)).ToString + "  Lux: " + (NCDLib.Math.MSBLSB(data2(2), data2(3)) * 0.25).ToString
                        SensorData.TypeData.Type9.Proximity = NCDLib.Math.MSBLSB(data2(0), data2(1))
                        SensorData.TypeData.Type9.Lux = NCDLib.Math.MSBLSB(data2(2), data2(3)) * 0.25
                    Case 10
                        rec.Description = "16-Bit Light"
                        rec.SensorReadings = "Lux: " + NCDLib.Math.MSBLSB(data2(1), data2(2)).ToString
                        SensorData.TypeData.Type10.Lux = NCDLib.Math.MSBLSB(data2(1), data2(2))
                    Case 12
                        rec.Description = "3-Channel Thermocouple Sensor"
                        Dim CelsiusValue1 As Decimal = Math.ToSigned32(data2(0), data2(1), data2(2), data2(3)) / 100
                        Dim CelsiusValue2 As Decimal = Math.ToSigned32(data2(4), data2(5), data2(6), data2(7)) / 100
                        Dim CelsiusValue3 As Decimal = Math.ToSigned32(data2(8), data2(9), data2(10), data2(11)) / 100
                        rec.SensorReadings = "Temperature Channel 1: C: " + CelsiusValue1.ToString
                        rec.SensorReadings = rec.SensorReadings + "Temperature Channel 2: C: " + CelsiusValue2.ToString
                        rec.SensorReadings = rec.SensorReadings + "Temperature Channel 3: C: " + CelsiusValue3.ToString
                        SensorData.TypeData.Type12.Celsius1 = NCDLib.Math.TemperatureDegrees(CelsiusValue1.ToString)
                        SensorData.TypeData.Type12.Fahrenheit1 = NCDLib.Math.TemperatureFahrenheit(CelsiusValue1)
                        SensorData.TypeData.Type12.Celsius2 = NCDLib.Math.TemperatureDegrees(CelsiusValue2.ToString)
                        SensorData.TypeData.Type12.Fahrenheit2 = NCDLib.Math.TemperatureFahrenheit(CelsiusValue2)
                        SensorData.TypeData.Type12.Celsius3 = NCDLib.Math.TemperatureDegrees(CelsiusValue3.ToString)
                        SensorData.TypeData.Type12.Fahrenheit3 = NCDLib.Math.TemperatureFahrenheit(CelsiusValue3)
                    Case 13
                        rec.Description = "24-Bit Current Monitor"
                        rec.SensorReadings = "Current Amps: " + (NCDLib.Math.MSBLSB24(data2(0), data2(1), data2(2)) / 1000).ToString
                        SensorData.TypeData.Type13.Amps = (NCDLib.Math.MSBLSB24(data2(0), data2(1), data2(2)) / 1000)
                        SensorData.TypeData.Type13.Milliamps = (NCDLib.Math.MSBLSB24(data2(0), data2(1), data2(2)))
                    Case 14
                        rec.Description = "10-Bit 1-Channel 4-20mA"
                        rec.SensorReadings = "ADC 1: " + NCDLib.Math.MSBLSB(data2(0), data2(1)).ToString + "  Current 1: " + NCDLib.Math.MSBLSB(data2(0), data2(1)).ToString
                        SensorData.TypeData.Type14.ADC1 = NCDLib.Math.MSBLSB(data2(0), data2(1))
                        SensorData.TypeData.Type14.Current1 = NCDLib.Math.MSBLSB(data2(0), data2(1)) * 0.00322265625
                    Case 15
                        rec.Description = "10-Bit 1-Channel ADC"
                        rec.SensorReadings = "ADC 1: " + NCDLib.Math.MSBLSB(data2(0), data2(1)).ToString
                        SensorData.TypeData.Type15.ADC1 = NCDLib.Math.MSBLSB(data2(0), data2(1))
                        SensorData.TypeData.Type15.Voltage1 = NCDLib.Math.MSBLSB(data2(0), data2(1)) * 0.00322265625
                    Case 24
                        rec.Description = "Activity Detection"
                        Dim ACCX As Decimal = NCDLib.Math.ToSigned16(data2(0), data2(1)) : rec.SensorReadings = rec.SensorReadings + "ACC X/g: " + ACCX.ToString
                        Dim ACCY As Decimal = NCDLib.Math.ToSigned16(data2(2), data2(3)) : rec.SensorReadings = rec.SensorReadings + " ACC Y/g: " + ACCY.ToString
                        Dim ACCZ As Decimal = NCDLib.Math.ToSigned16(data2(4), data2(5)) : rec.SensorReadings = rec.SensorReadings + " ACC Z/g: " + ACCZ.ToString
                        Dim CelsiusValue As Int16 = Math.ToSigned16(data2(6), data2(7)) : rec.SensorReadings = rec.SensorReadings + " Temperature C: " + CelsiusValue.ToString
                        SensorData.TypeData.Type24.Acceleration_Xg = ACCX
                        SensorData.TypeData.Type24.Acceleration_Yg = ACCY
                        SensorData.TypeData.Type24.Acceleration_Zg = ACCZ
                        SensorData.TypeData.Type24.Celsius = NCDLib.Math.TemperatureDegrees(CelsiusValue.ToString)
                        SensorData.TypeData.Type24.Fahrenheit = NCDLib.Math.TemperatureFahrenheit(CelsiusValue)
                    Case 25
                        rec.Description = "Asset Monitoring"
                        Dim ACCX As Decimal = NCDLib.Math.ToSigned16(data2(0), data2(1)) : rec.SensorReadings = rec.SensorReadings + "ACC X/g: " + ACCX.ToString
                        Dim ACCY As Decimal = NCDLib.Math.ToSigned16(data2(2), data2(3)) : rec.SensorReadings = rec.SensorReadings + " ACC Y/g: " + ACCY.ToString
                        Dim ACCZ As Decimal = NCDLib.Math.ToSigned16(data2(4), data2(5)) : rec.SensorReadings = rec.SensorReadings + " ACC Z/g: " + ACCZ.ToString
                        Dim CelsiusValue As Int16 = Math.ToSigned16(data2(6), data2(7)) : rec.SensorReadings = rec.SensorReadings + " Temperature C: " + CelsiusValue.ToString
                        SensorData.TypeData.Type24.Acceleration_Xg = ACCX
                        SensorData.TypeData.Type24.Acceleration_Yg = ACCY
                        SensorData.TypeData.Type24.Acceleration_Zg = ACCZ
                        SensorData.TypeData.Type24.Celsius = NCDLib.Math.TemperatureDegrees(CelsiusValue.ToString)
                        SensorData.TypeData.Type24.Fahrenheit = NCDLib.Math.TemperatureFahrenheit(CelsiusValue)
                    Case 35
                        rec.Description = "32-Bit 1-Channel Counter"
                        rec.SensorReadings = "Counts: " + NCDLib.Math.MSBLSB32(data2(0), data2(1), data2(2), data2(3)).ToString
                        SensorData.TypeData.Type35.Counter = NCDLib.Math.MSBLSB32(data2(0), data2(1), data2(2), data2(3))
                    Case 36
                        rec.Description = "16-Bit 2-Channel Counter"
                        rec.SensorReadings = "Channel 1 Counts: " + NCDLib.Math.MSBLSB(data2(0), data2(1)).ToString + " Channel 2 Counts: " + NCDLib.Math.MSBLSB(data2(2), data2(3)).ToString
                        SensorData.TypeData.Type36.Counter1 = NCDLib.Math.MSBLSB(data2(0), data2(1))
                        SensorData.TypeData.Type36.Counter2 = NCDLib.Math.MSBLSB(data2(2), data2(3))
                    Case 37
                        rec.Description = "7-Channel Push Notification + 2-Channel 10-Bit ADC"
                        Dim IN1 As Byte = 0 : If (data2(0) And 1) = 1 Then IN1 = 1
                        Dim IN2 As Byte = 0 : If (data2(0) And 2) = 2 Then IN2 = 1
                        Dim IN3 As Byte = 0 : If (data2(0) And 4) = 4 Then IN3 = 1
                        Dim IN4 As Byte = 0 : If (data2(0) And 8) = 8 Then IN4 = 1
                        Dim IN5 As Byte = 0 : If (data2(0) And 16) = 16 Then IN5 = 1
                        Dim IN6 As Byte = 0 : If (data2(0) And 32) = 32 Then IN6 = 1
                        Dim IN7 As Byte = 0 : If (data2(0) And 64) = 64 Then IN7 = 1
                        rec.SensorReadings = rec.SensorReadings + "IN1: " + IN1.ToString
                        rec.SensorReadings = rec.SensorReadings + " IN2: " + IN2.ToString
                        rec.SensorReadings = rec.SensorReadings + " IN3: " + IN3.ToString
                        rec.SensorReadings = rec.SensorReadings + " IN4: " + IN4.ToString
                        rec.SensorReadings = rec.SensorReadings + " IN5: " + IN5.ToString
                        rec.SensorReadings = rec.SensorReadings + " IN6: " + IN6.ToString
                        rec.SensorReadings = rec.SensorReadings + " IN7: " + IN7.ToString
                        rec.SensorReadings = rec.SensorReadings + " ADC1: " + NCDLib.Math.MSBLSB(data2(1), data2(2)).ToString
                        rec.SensorReadings = rec.SensorReadings + " ADC2: " + NCDLib.Math.MSBLSB(data2(3), data2(4)).ToString
                        SensorData.TypeData.Type37.AllInputs = data2(0)
                        SensorData.TypeData.Type37.IN1 = IN1
                        SensorData.TypeData.Type37.IN2 = IN2
                        SensorData.TypeData.Type37.IN3 = IN3
                        SensorData.TypeData.Type37.IN4 = IN4
                        SensorData.TypeData.Type37.IN5 = IN5
                        SensorData.TypeData.Type37.IN6 = IN6
                        SensorData.TypeData.Type37.IN7 = IN7
                        SensorData.TypeData.Type37.ADC1 = NCDLib.Math.MSBLSB(data2(1), data2(2))
                        SensorData.TypeData.Type37.ADC2 = NCDLib.Math.MSBLSB(data2(3), data2(4))
                        SensorData.TypeData.Type3.Voltage1 = NCDLib.Math.MSBLSB(data2(1), data2(2)) * 0.00322265625
                        SensorData.TypeData.Type3.Voltage2 = NCDLib.Math.MSBLSB(data2(3), data2(4)) * 0.00322265625
                    Case 40
                        rec.Description = "Vibration Sensor V2"
                        Dim RMSX As Decimal = NCDLib.Math.ToSigned24(data2(0), data2(1), data2(2)) : rec.SensorReadings = rec.SensorReadings + "RMS X/g: " + (RMSX / 100000).ToString
                        Dim RMSY As Decimal = NCDLib.Math.ToSigned24(data2(3), data2(4), data2(5)) : rec.SensorReadings = rec.SensorReadings + " RMS Y/g: " + (RMSY / 100000).ToString
                        Dim RMSZ As Decimal = NCDLib.Math.ToSigned24(data2(6), data2(7), data2(8)) : rec.SensorReadings = rec.SensorReadings + " RMS Z/g: " + (RMSZ / 100000).ToString
                        Dim MAXX As Decimal = NCDLib.Math.ToSigned24(data2(9), data2(10), data2(11)) : rec.SensorReadings = rec.SensorReadings + " MAX X/g: " + (MAXX / 100000).ToString
                        Dim MAXY As Decimal = NCDLib.Math.ToSigned24(data2(12), data2(13), data2(14)) : rec.SensorReadings = rec.SensorReadings + " MAX Y/g: " + (MAXY / 100000).ToString
                        Dim MAXZ As Decimal = NCDLib.Math.ToSigned24(data2(15), data2(16), data2(17)) : rec.SensorReadings = rec.SensorReadings + " MAX Z/g: " + (MAXZ / 100000).ToString
                        Dim MINX As Decimal = NCDLib.Math.ToSigned24(data2(18), data2(19), data2(20)) : rec.SensorReadings = rec.SensorReadings + " MIN X/g: " + (MINX / 100000).ToString
                        Dim MINY As Decimal = NCDLib.Math.ToSigned24(data2(21), data2(22), data2(23)) : rec.SensorReadings = rec.SensorReadings + " MIN Y/g: " + (MINY / 100000).ToString
                        Dim MINZ As Decimal = NCDLib.Math.ToSigned24(data2(24), data2(25), data2(26)) : rec.SensorReadings = rec.SensorReadings + " MIN Z/g: " + (MINZ / 100000).ToString
                        Dim CelsiusValue As Int16 = Math.ToSigned16(data2(27), data2(28)) : rec.SensorReadings = rec.SensorReadings + " Temperature C: " + CelsiusValue.ToString
                        SensorData.TypeData.Type40.RMSX = RMSX / 100000
                        SensorData.TypeData.Type40.RMSY = RMSY / 100000
                        SensorData.TypeData.Type40.RMSZ = RMSZ / 100000
                        SensorData.TypeData.Type40.MAXX = MAXX / 100000
                        SensorData.TypeData.Type40.MAXY = MAXY / 100000
                        SensorData.TypeData.Type40.MAXZ = MAXZ / 100000
                        SensorData.TypeData.Type40.MINX = MINX / 100000
                        SensorData.TypeData.Type40.MINY = MINY / 100000
                        SensorData.TypeData.Type40.MINZ = MINZ / 100000
                        SensorData.TypeData.Type40.Celsius = NCDLib.Math.TemperatureDegrees(CelsiusValue.ToString)
                        SensorData.TypeData.Type40.Fahrenheit = NCDLib.Math.TemperatureFahrenheit(CelsiusValue)
                    Case 41
                        rec.Description = "16-Bit RPM Proximity Sensor"
                        rec.SensorReadings = "Base: " + NCDLib.Math.MSBLSB(data2(0), data2(1)).ToString + "  RPM: " + NCDLib.Math.MSBLSB(data2(2), data2(3)).ToString
                        SensorData.TypeData.Type41.Base = NCDLib.Math.MSBLSB(data2(0), data2(1))
                        SensorData.TypeData.Type41.RPM = NCDLib.Math.MSBLSB(data2(2), data2(3))
                End Select
1 Like

Ryan, I’m looking at using the pressure differential sensor, as that is the only one that I see which can handle vacuum pressure. Plan on monitoring the vacuum pumps that holds the material down on a cnc router. Case 6 looks like the only one for pressure, is that the one to use? If so, looks like it’s just a matter of parsing the data string and performing some math. Is there any way I could get an example of an incoming data string that I can practice parsing? Thanks

EDIT: Here is a screenshot of the TCP device setup in Ignition

1 Like

Hi Daniel,
I’m afraid I do not have a raw packet available but the documentation fully describes the packet structure on the product page/resources tab. Bhaskar is in charge of this project, he is currently traveling to India and will be back in the office in about seven weeks. I can definitely help you on any Alpha Station code though. Sorry for the inconvenience on this.
Thanks,
Ryan

So I found the resources page and this is what I found out… Looks like I’ve got the logic down, now I just need to implement it. :slight_smile:

1 Like

Hi Daniel,
Looks like you have figured out everything from the product documentation. Just one tip, please save the temperature data as signed integer in your code.
If you need any other assistance regarding data parsing/processing, please let me know.

1 Like

I noticed that the documentation that I went through shows the sensor using a dongle of some sort to connect to the PC. I want to use the Ethernet wireless gateway to connect to my software. Will the data packet remain unaltered through the ethernet gateway, or is it converted into another format during this transfer? Thanks Talha.

Hi Daniel,
Although a Zigmo/Router is shown in the documentation, but the documentation is valid for the Ethernet wireless gateway as well. The Gateway has the same router installed on it, the only difference is the mode of delivery to the PC. The packets/protocol remains the same.

Thanks

Nice, Appreciate the info Talha

If I buy a sensor/gateway that does not operate on MODBUS then NCD releases it with Modbus, will I be able to update my hardware to use the Modbus? Or will I have to get new hardware as well?

Sorry I didn’t get you. Are you referring to Wireless Gateway?