mrchris76
Lifetime Supporting Member
History:
On my production line there is a section that will store the finished product in case the unload section goes down or is unable to keep up. I was tasked with tracking the product throughout the production line and to track the glass that was accumulated in this section I used ratcheting (----COP----COP-----MOV, this is explained on this site in another thread http://www.plctalk.net/qanda/showthread.php?p=360425&postcount=1 ) to fill/empty a group of arrays with the data that I was tracking. This worked fine since I needed a FILO type of system. I used the a GSV to get the time that the product hit the line and used the day, hour, min and sec as the product ID. This all worked fine since I was using DINT's for all of the data I was tracking.
We now want to use a variable to track the month in the product ID.
A=January, B=February, C=March....
Again I was able to track the product through most of the production line by turning the DINT's into a concatenated string. The problem I am having is that I can't use my ratcheting function on the accumulator section of the line since I can't used the COP or MOV function blocks for the STRING data type.
Some ideas I have are to just add another variable on the GUI that will house the month variable and place it in front of the DINT for the rest of the data. This does not seem like an elegant way of accomplishing this. I tried to use the CONCAT function (String 1 concatenated with a blank string that got moved into a another string, pseudo move function for STRING data type) in place of the MOV and COP functions but it didn't work because I could not get the data to ratchet properly. Does anyone have any ideas on how I can accomplish my task?
Thanks in advance,
Chris
On my production line there is a section that will store the finished product in case the unload section goes down or is unable to keep up. I was tasked with tracking the product throughout the production line and to track the glass that was accumulated in this section I used ratcheting (----COP----COP-----MOV, this is explained on this site in another thread http://www.plctalk.net/qanda/showthread.php?p=360425&postcount=1 ) to fill/empty a group of arrays with the data that I was tracking. This worked fine since I needed a FILO type of system. I used the a GSV to get the time that the product hit the line and used the day, hour, min and sec as the product ID. This all worked fine since I was using DINT's for all of the data I was tracking.
We now want to use a variable to track the month in the product ID.
A=January, B=February, C=March....
Again I was able to track the product through most of the production line by turning the DINT's into a concatenated string. The problem I am having is that I can't use my ratcheting function on the accumulator section of the line since I can't used the COP or MOV function blocks for the STRING data type.
Some ideas I have are to just add another variable on the GUI that will house the month variable and place it in front of the DINT for the rest of the data. This does not seem like an elegant way of accomplishing this. I tried to use the CONCAT function (String 1 concatenated with a blank string that got moved into a another string, pseudo move function for STRING data type) in place of the MOV and COP functions but it didn't work because I could not get the data to ratchet properly. Does anyone have any ideas on how I can accomplish my task?
Thanks in advance,
Chris