I have some questions that I am hoping someone might be able to answer.
Is there a way to determine wire time? (I hope I have this term correct, what I want to know is how long it takes for my data to get from the PLC back to the PC and into the SQL table)
If I have 40 tags going back for historical data, 2 are 20 char ASCII strings, 3 are 4 char ASCII strings, 24 are boolean bits and the remaining 12 are DINT. Would it be more efficient to use a standard group or a block group or it would not matter? I am using a trigger, this is why I am curious about wire time. I want to know that the data is stable then in FSQL when the trigger goes active it correctly grabs this data and sends it to the SQL table.
This kind of goes as follows. On the PLC we are using there is a compact flash card. THe same time that the data is written to the compact flash it also sets the bit that triggers the group to read the historical data and write it to the SQL table. Both the write to compact flash and the timing in FSQL for the group is set at the same value 1 Sec. However what we are seeing is that FSQL will read the same data and write the same data twice so you end up having dupe records in the data base. When it does this it sometimes misses the next event record. I am thinking it probably is takeing more than 1 second to read all the data from the PLC and that when the trigger goes high a second time within a two to three second interval that there is not enough time to read the data so it writes whatever was there last. I only think this because we did a study on friday where we ran the machine and recorded all the data. then we dumped the data from the compact flash and checked it with the manual form. This was 100% good. However when we checked it against the SQL table there were flaws.
One other option that I am thinking might work well would be to have FSQL do the time stuff. That 20 char ascii is a date/time stamp and proveds a span of time. Instead of doing it at the PLC just monitor the bits and have some sort of script or something that would do the same thing. This way that amount of data would not require as much wire time. It takes less to read a bit than it does to read a string. Or at least I think so. Not sure. A couple of other areas that read the strings might also work well doing it as a bit and having FSQL convert it. Any thoughts on if this would be better, same, worse, etc…
Just trying to get all data validated so we can continue to move forward with this project.