Channel not plotting


robopp
 Share

Recommended Posts

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

  • 2 weeks later...

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

  • 4 weeks later...

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share