The GDC communicates with the JNIOR using MODBUS. Look MODBUS is great for controlling things (e.g. commanding a relay to close) but it is terrible for monitoring (e.g. watching for an input to change). In order to monitor a signal the client (GDC) has to poll (repeatedly ask for) the status of the JNIOR (server) input or condition to monitor. Polling is terrible in that you can never ask for status fast enough or often enough to see the change that you are looking for as promptly as you would want. You end up with a lot of repetitious communications with each and every one with the exact same response. The GDC scans the JNIOR repeatedly and eventually it appears to get the wrong result. The fire alarm inputs do not change state but the GDC picks up a false status. The show can be interrupted and there, thankfully, is no fire.
Here we see the same programming error and the same trap that DoReMi and others have fallen into. Unfortunately programmers these days do not have the experience and do not get the training they might need to properly implement a basic TCP/IP network connection. Here the point they need to get is that one protocol message DOES NOT equal one packet. It is a continuous stream of data.
In other works you cannot open the connection, read data and then simply parse the message. That program read statement returns the count of the characters/bytes obtained for a reason. The read statement returns whatever happens to be available in the incoming data buffer at the time. This can be a complete message, it might only be part of a message or it can even return much more than one message. So you need to take care to extract each complete message from the stream before processing it. If you need more data go back and read more. If you get too much then save the balance for the next message.
Unfortunately when things like MODBUS clients are developed and tested most (if not all) of the test messages are sufficiently packaged one to one in their respective packets. Testing in the real world takes time and effort. Not enough programmers actually use their own products in an actual application and for any real length of time. They should.
In GDCs case they apparently get only part of the message but parse the entire buffer area as if it was properly filled with the entire message and read uninitialized bytes as input status.
In their defense they probably pulled the MODBUS client package from some library and whomever had programmed that years back failed to setup the proper message acquisition code. In fact someone in the past might have pulled other code and, basically, no one really knows what is doing what and who might have been behind a lot of it. For some reason we see this programming deficiency more and more these days.
If you pull a network capture from the JNIOR right after the false alarm (Series 4 lets you do that) you will see that the JNIOR sends the proper reply to the poll request but splits that packet in two. It is the nature of the multi-tasking environment and the TCP/IP transmission algorithms that it can happen. It is 100% proper TCP/IP performance.
We worked with DoReMi in the past to get their related issue resolved and we can do the same with GDC. However, we have decided to limit the risk of this going forward by adjusting JANOS (the operating system running your Series 4 JNIORs) to try its hardest to package one message in one packet. I am not a "mask the symptom" and much more of a "fix the problem" kind of guy. In this case, I don't think "the problem" is fixable. Not with the way software is developed these days and how experience is valued (or not) when it comes to employment.
We will issue a JANOS v1.8.1 update very soon. I will let you know. That update will limit the issue for those of you with Series 4 JNIORs. We cannot do anything about this in the older Series 3 units. GDC will need to address it.
If you have GDC installations and have seen this or fear that you might, you can get this update. You can also likely get the pre-release (Release Candidate) from our support department to put your mind at rest even sooner if you want.
The JNIOR Protocol and in the Series 4 the JMP Protocol (optionally available through a Websocket connection) eliminates the need for polling. Those protocols actively signal input status changes. It is a logical alternative to MODBUS. Also, unlike MODBUS, these protocols allow for login and provide some level of security. Just saying...
Here we see the same programming error and the same trap that DoReMi and others have fallen into. Unfortunately programmers these days do not have the experience and do not get the training they might need to properly implement a basic TCP/IP network connection. Here the point they need to get is that one protocol message DOES NOT equal one packet. It is a continuous stream of data.
In other works you cannot open the connection, read data and then simply parse the message. That program read statement returns the count of the characters/bytes obtained for a reason. The read statement returns whatever happens to be available in the incoming data buffer at the time. This can be a complete message, it might only be part of a message or it can even return much more than one message. So you need to take care to extract each complete message from the stream before processing it. If you need more data go back and read more. If you get too much then save the balance for the next message.
Unfortunately when things like MODBUS clients are developed and tested most (if not all) of the test messages are sufficiently packaged one to one in their respective packets. Testing in the real world takes time and effort. Not enough programmers actually use their own products in an actual application and for any real length of time. They should.
In GDCs case they apparently get only part of the message but parse the entire buffer area as if it was properly filled with the entire message and read uninitialized bytes as input status.
In their defense they probably pulled the MODBUS client package from some library and whomever had programmed that years back failed to setup the proper message acquisition code. In fact someone in the past might have pulled other code and, basically, no one really knows what is doing what and who might have been behind a lot of it. For some reason we see this programming deficiency more and more these days.
If you pull a network capture from the JNIOR right after the false alarm (Series 4 lets you do that) you will see that the JNIOR sends the proper reply to the poll request but splits that packet in two. It is the nature of the multi-tasking environment and the TCP/IP transmission algorithms that it can happen. It is 100% proper TCP/IP performance.
We worked with DoReMi in the past to get their related issue resolved and we can do the same with GDC. However, we have decided to limit the risk of this going forward by adjusting JANOS (the operating system running your Series 4 JNIORs) to try its hardest to package one message in one packet. I am not a "mask the symptom" and much more of a "fix the problem" kind of guy. In this case, I don't think "the problem" is fixable. Not with the way software is developed these days and how experience is valued (or not) when it comes to employment.
We will issue a JANOS v1.8.1 update very soon. I will let you know. That update will limit the issue for those of you with Series 4 JNIORs. We cannot do anything about this in the older Series 3 units. GDC will need to address it.
If you have GDC installations and have seen this or fear that you might, you can get this update. You can also likely get the pre-release (Release Candidate) from our support department to put your mind at rest even sooner if you want.
The JNIOR Protocol and in the Series 4 the JMP Protocol (optionally available through a Websocket connection) eliminates the need for polling. Those protocols actively signal input status changes. It is a logical alternative to MODBUS. Also, unlike MODBUS, these protocols allow for login and provide some level of security. Just saying...
Comment