robopp Posted December 9, 2017 Share Posted December 9, 2017 I have three 'virtual' channels that are populated using events from other channels. For instance, one channel is a pump inlet pressure in bar. When this channel is updated I use it's event to convert this data into PSI and write the converted data to the 'virtual' pump inlet pressure in psi. I'm attempting to graph these three 'virtual' channels, but they don't show up. There are other channels that are not virtual that graph fine on the same plot. I sent the project file to your support email. Link to comment Share on other sites More sharing options...
AzeoTech Posted December 20, 2017 Share Posted December 20, 2017 Usually this occurs when the data points being added to the virtual channel all have the same time stamp. This can happen easily if you are doing any math with a variable. For example, if you had a variable called "scaling" and were doing: v.myChannel.addValue(myOtherChannel[0] * scaling) You don't know if DAQFactory is going to pull time from myOtherChannel[0] or from scaling. myOtherChannel is changing, but scaling's time is fixed to the last time it was updated, so if it uses the time from scaling then all the data points end up with the same time. To ensure this doesn't happen, explicitly assign a time stamp using insertTime(): v.myChannel.addValue(insertTime(myOtherChannel[0] * scaling, myOtherChanneltime[0], 0)) Link to comment Share on other sites More sharing options...
robopp Posted December 21, 2017 Author Share Posted December 21, 2017 I added InsertTime to all my virtual AddValue calls, but the issue still persists. Any additional ideas? I should note that the missing traces sometimes show up. Link to comment Share on other sites More sharing options...
robopp Posted January 16, 2018 Author Share Posted January 16, 2018 Any help would be greatly appreciated. I still cannot figure out what's going on with my traces. Link to comment Share on other sites More sharing options...
AzeoTech Posted January 17, 2018 Share Posted January 17, 2018 I'd need to see what you did. Often the problems are just syntax errors. Link to comment Share on other sites More sharing options...
robopp Posted January 17, 2018 Author Share Posted January 17, 2018 Here's one example: Pump_Inlet_Pressure_PSI.AddValue(InsertTime(Pump_Inlet_Pressure_bar[0]*14.5038, Pump_Inlet_Pressure_bar[0], 0)) Pump_Inlet_Pressure_PSI is a virtual channel. Pump_Inlet_Pressure_bar is a channel that's populated using received telemetry data from the embedded system. Link to comment Share on other sites More sharing options...
AzeoTech Posted January 19, 2018 Share Posted January 19, 2018 You aren't assigning the proper time. You want the second parameter to be: Pump_Inlet_Pressure_Bar.time[0] otherwise you are assigning the value of that channel as the time, which is likely giving you dates around 1970. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.