wallage Posted July 13, 2010 Report Share Posted July 13, 2010 Hello, I have a pretty simple program with a picture control on the front-panel on which I want to be able to draw a wave. I already came this far . Next I want to have some kind of function which uses the picture and generates a waveform which can be generated by the DAQ hardware. Does anyone know if this is possible and how? attached is what I came up with this far. main.vi Quote Link to comment
jcarmody Posted July 13, 2010 Report Share Posted July 13, 2010 It's possible, but you'd have to validate the drawing's data before you could make it into a waveform. I've made it into an X-Y Graph by doing this: What would your waveform look like if you moved your pen from right-to-left? That's one thing you'd need to handle. Interesting question, however. What's your application going to do? main.vi (LV 8.2) Quote Link to comment
wallage Posted July 14, 2010 Author Report Share Posted July 14, 2010 It's possible, but you'd have to validate the drawing's data before you could make it into a waveform. I've made it into an X-Y Graph by doing this: What would your waveform look like if you moved your pen from right-to-left? That's one thing you'd need to handle. Interesting question, however. What's your application going to do? main.vi (LV 8.2) thanks for you reply. I want to make a program where you can draw a waveform which can be later on be generated by my DAQ analog out. Quote Link to comment
jcarmody Posted July 14, 2010 Report Share Posted July 14, 2010 I want to make a program where you can draw a waveform which can be later on be generated by my DAQ analog out. I understood that part, I just don't understand why. I've modified my earlier example to use the Waveform data type, but you'll see that it doesn't faithfully represent what's been drawn. This is where you'll have to define how to convert X-Y data into a waveform (axis scaling and handling right-to-left pen movement, to start). Do you understand what I mean? main (1).vi 1 Quote Link to comment
wallage Posted July 14, 2010 Author Report Share Posted July 14, 2010 but you'll see that it doesn't faithfully represent what's been drawn. This is where you'll have to define how to convert X-Y data into a waveform (axis scaling and handling right-to-left pen movement, to start). Do you understand what I mean? Thanks again for you reaction. I have been tuning my software and also added code to scale/sort x- and y-axis. My waveform is now almost a duplicate of the drawing. There is however a bug which I haven't found jet which screws up my x-axis scaling. I'll try to fix this myself. Thanks for all the help so far. 1 Quote Link to comment
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.