' --------------------------------------------------------------------- ' Copyright Daktronics, Inc. 2011. All Rights Reserved. ' ' Script for receiving Standard RTD and outputing it with Enhanced RTD with a 0 byte offset. ' - This script should be set as an active file on the port that will ' receive the Standard RTD. ' - This script will then translate the data into Daktronics Enhanced RTD, add the offset ' and send it out the port named "File Output". ' ' Author : Jason Warne ' ' Revision History: ' 00 - 02/07/11 - JCW Initial Release ' 01 - 03/28/12 - EVB Changed for use with File RTD ' '---------------------------------------------------------------------- Sub Port_OnSRTDReceiveData(portIndex, change, frame, dimming, offset, length, data) Dim nChunkSize nChunkSize = 475 Dim nChunks nChunks = Int ((length/nChunkSize) + 1) 'note we had to change this to convert floating to whole... other wise IF will never get hit below 'Dim nBaseOffset 'nBaseOffset = 0 Dim nStart nStart = 0 Dim sSend For nCur=1 To nChunks sSend = Mid(data, nStart+1, nChunkSize) ports.namedItem("File Output").ERTDSendData 0, sSend, Len(sSend), 0, 1, (nBaseOffset + nStart) nStart = nStart + nChunkSize Next End Sub