Your issue seems to be the same as mine: the display range does not exceed the recording trend range. This appears to be a limitation of the current method... In my case, I verified the date range in the trend storage and compared it with the 'timestampfrom' and 'timestampto'. If the requested range falls outside the recorded data, I activated a message to notify the user.
You firstly tried as followings but it doesn't work, right? pDT := pbNewValue; dTemp := pDT^; It worked in my case. CODESYS 3.5.17.30 and CODESYS Visualization 4.2.0.0 is my environment. Actually, a date time picker element calls the event handler for several times while changing operation, but it triggers the event with desired value on the last call. Doesn't it?
I resolved it myself. To achieve this, create a FB which implements VisuElems.IValueChangedListener and Implement the method "ValueChanged". METHOD ValueChanged : BOOL VAR_INPUT itfVisualization : VisuElems.IVisualisation; ... pbNewValue : POINTER TO BYTE; ... END_VAR VAR instIDateRangeSelectorClient:VisuElemTrace.IDateRangeSelectorClient; instITimeSelectorClient:VisuElemTrace.ITimeSelectorClient; i:INT; pArrElems:POINTER TO ARRAY[0..10] OF VisuElems.IVisualElement; icount:INT; liTimestampFrom:LINT;...
I resolved it myself. To achieve this, create a FB which implements VisuElems.IValueChangedListener and Implement the method "ValueChanged". METHOD ValueChanged : BOOL VAR_INPUT itfVisualization : VisuElems.IVisualisation; ... pbNewValue : POINTER TO BYTE; ... END_VAR VAR instIDateRangeSelectorClient:VisuElemTrace.IDateRangeSelectorClient; instITimeSelectorClient:VisuElemTrace.ITimeSelectorClient; pinstVisuFbFrame:POINTER TO VisuElems.VisuFbFrame; instVisu:VisuElems.IVisualisation; elementInfo:VisuElems.Visu_StructElementInfo;...
Self resolved. Changing readLen := SysFileRead(hFile:=hFile, pbyBuffer:=pbyBuffer, ulSize:=udiMaxNrBytes, pResult:=ADR(error)); to readLen := SysFileRead(hFile:=hFile, pbyBuffer:=pbyBuffer, ulSize:=udiMaxNrBytes-10, pResult:=ADR(error)); cleared the problem. But still, I don't understand why that happens.
Hello, I am working on downloading a file exists on remote controller over WebVisu. Following the file transfer example , I prepared a FB implements IVisuStreamReader to use file transfer feature on Visu as the screenshot attached, and it works with some small files enough to read whole content in 1 scan. But with larger file, downloaded file contains only the end part of the original file. Does anyone know how to fix this? Best regards,
I guess the range can be managed using VisuElemsDateTime_Interfaces.IDateRangeSelectorClient.SetCurrentRange() method. But I have no idea how to get the instance of the Trend element. Does anyone know any way to get the instance by element ID, name or something?
Hi, I know showing range of the trend visualization can be controlled with the date range picker and the time range picker. Is there any way to control the range of the trend graph through variables? (like with start/end DATE_AND_TIME vars) I want to change the range with date/time picker to show historical data. Best regards,