General speaking, the progress of the three
major projects have been breakthrough in this week. The first one is the most
long time on-going project, which has carried out more than ten months: the
software of the servo press. It would applied in collecting the data from
sensor in machine and make the further analysis for exporting the report.
However, the fundamental functions had been developed prior to the automation
in Taipei this year, the additional application still have been demanded for gaining
competitive. Recently, the issue of over slowly data transferring and recording
have been discussed and required to make the clearly improvement. Due to the
transfer speed rate limitation of the Modbus protocol, we are not able to solve
the problems merely revise the code slightly. Thus, we attempt to seek the
broadly application such as building buffer and read the batch of data once a
time.
Fortunately, the batch read in Modbus is
not the rare application. We have found out the available library soon after,
although it only support for the 16 bits and acquire the data from 100 register
at one time. Above problems will not be difficult to be solved by building the
proper program. We can read more times to settle the limitation of acquiring
data and combine the two 16 bits into the 32bits data. Nonetheless, the coming
function might be much more challenging. We have to read the batch data
according to the command in PLC. The PLC would save the data in two main buffer
regions. Thus, when the PLC is saving data in one region, our program is
necessary to acquire the batch data from another in the short time. Afterward,
the batch data is supposed to be combined and sort into something seems like
transferred one by one. Finally, I have built the complete class to carry all
of above process. The key point in this function would be the switch the
reading buffer and sort out the large amount of data without messing up.
After the three weeks of hard work, we
finally finished the tasks. It could be executed just like before, but it would
be able to record the data two hundred in a second. It exactly the most
important breakthrough of data transfer during these
months and we could thus focus on other issue without the unsolved problems.
沒有留言:
張貼留言