Lockie Posted September 3, 2021 Share Posted September 3, 2021 Hi I am trying to create a graph that begins at zero at a zero time stamp. However when I change the graph x expression (in graph properties) from "time" to anything referencing "systime()" the trace disappears. My approach was to use the start time from a button that runs the below code: global expStartTime1 = systime() // Test Phase Timer global expStopTime1 = 0 global GraphTime = Time() and create a graph using the x expression "systime()-expStartTime1" (with bottom axis set to time and date). I have tried heaps of things but it appears that when systime() is used I lose the data? Any help would be really appreciated. Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted September 7, 2021 Share Posted September 7, 2021 You have the right idea, but the problem is that systime() - expStartTime1 is a scalar and you can't plot a single data point. You need an array of times, and the best place for that is in your Y data. So if your Y Expression is "MyChannel", your X expression would be "MyChannel.time - expStartTime1". Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.