Jimmy1125 Posted October 29, 2016 Share Posted October 29, 2016 I am a newbie to daq. I built a shock dyno and need to learn to do some scripting or programming but I don't know where to start. I would like to do a GUI. Do I script first or build the GUI? Link to comment Share on other sites More sharing options...
AzeoTech Posted October 31, 2016 Share Posted October 31, 2016 Depending on what you are doing, you may not need to script at all, or may only need a few lines. But usually most people start by getting some data coming into their system. Then once they have some data coming in, even if its not all the data, you can start creating the GUI. If you need to setup your inputs, for example streaming from a LabJack, I'd start with your other channels and worry about the streaming later as that will require a couple lines of script. One of the nice things about DAQFactory is that its live development, so you can add just one channel and see data coming in, then add some GUI to view that data, then add some more channels and more detail all while the data keeps coming in. There is no code->compile->test cycle of other SCADA (and programming) environments. Link to comment Share on other sites More sharing options...
Jimmy1125 Posted October 31, 2016 Author Share Posted October 31, 2016 Thank you for replying. I have data coming in. I can view it on the graph portion of the channel. I can't seem to get it to show up on a x,y graph. I set up Page 1 but nothing shows. Link to comment Share on other sites More sharing options...
AzeoTech Posted October 31, 2016 Share Posted October 31, 2016 That doesn't tell me much. If you have the data in a channel and it appears on the Graph tab of the channel view, you should be able to drop a graph on any page, enter the channel name (with no [0]) in the Y Expression, then autoscale the Y axis of the graph and view the data. If you have problems I'll need to see what you've done. Link to comment Share on other sites More sharing options...
Jimmy1125 Posted November 1, 2016 Author Share Posted November 1, 2016 Thanks my goof. I had the wrong channel name. I have a problem with reading the velocity sensor. It actually reads backwards . At zero velocity there should be no force from the load cell but mine shows 0 at max velocity and max force at 0 velocity. Am I reading the channel wrong? I have positive to ain0 and negative to ain1. I'm reading ain0 on my graph. Is this correct? Link to comment Share on other sites More sharing options...
AzeoTech Posted November 1, 2016 Share Posted November 1, 2016 Again, this stuff (i.e. data acquisition) isn't that plug and play that I can tell you what to do with such little information. If its reading inverse it could be reverse polarity, though that would typically mean you'd get negative values. Since I have no idea what velocity sensor you are using or how you wired it that's about all I can say about it. Anyhow, if it is reversed, you can always just use a Conversion to flip it in software instead of worrying about it in hardware. So, if the sensor reads 0 when it should read 100 and 100 when it should read 0, the conversion would just be: 100 - Value Link to comment Share on other sites More sharing options...
Jimmy1125 Posted November 12, 2016 Author Share Posted November 12, 2016 It seems like I'm reading my x axis as time even though it's configured for my velocity sensor. I can't change the time threshold as it's grayed out. My velocity sensor sensitivity is 45 MV/in/sec. How do I align this to read my load cell force at the correct moment? Link to comment Share on other sites More sharing options...
AzeoTech Posted November 14, 2016 Share Posted November 14, 2016 I really need to see your ctl document. Link to comment Share on other sites More sharing options...
Jimmy1125 Posted November 15, 2016 Author Share Posted November 15, 2016 I have enclosed my ctl file.my problem is on speed channel. also could you look at the damping channel? I'm trying to do a differential between ain 6 and ain7. damping.ctl Link to comment Share on other sites More sharing options...
Jimmy1125 Posted November 22, 2016 Author Share Posted November 22, 2016 Could you help me with aligning data on my graph. I'm trying to read my load cell at different velocities. The graph should look like a < with compression (+ numbers)going up and rebound(- numbers going down. It should all relate to velocity from 0 to 10 in/sec. Link to comment Share on other sites More sharing options...
AzeoTech Posted November 23, 2016 Share Posted November 23, 2016 I'm not sure what the issue is. You should be able to plot one channel vs the other since they are both being acquired at the same interval. Just replace the X expression with whichever channel you want for the X axis, then go to the bottom axis settings and set the Type to Lin and the Align Threshold to 0.00 Link to comment Share on other sites More sharing options...
Jimmy1125 Posted November 24, 2016 Author Share Posted November 24, 2016 Thanks for the help. I'm getting closer but it's still not right. If I set alignment to 0.0 I get no data on graph. If I use something like 0.01 or 0.001 it shows up. The graph looks like a football on a 45 degree angle. It should be almost a straight line from 2:00 to 8:00. I know it won't be quite straight due to some latency but it's really far off. This graph is based on the x axis of velocity from -10 to 10 in/sec. Is there a way to graph without the sign in front. Example: at 1" I would have two points, one for compression (+)and another for rebound(-) This would result in a graph with a sideways V shape(<) Link to comment Share on other sites More sharing options...
AzeoTech Posted November 28, 2016 Share Posted November 28, 2016 You'd have to look at the difference in time. 0.0 alignment only works if the x and y points have the exact same time. Yours must be off by a millisecond or something. So you want -10 to 10 to become just 0 to 10? Where -10 = 10 and 10 = 10? Just use the abs() function for absolute value. So: abs(velocity) instead of velocity Link to comment Share on other sites More sharing options...
Jimmy1125 Posted December 7, 2016 Author Share Posted December 7, 2016 Thanks for the help The abs() function is exactly what I need. I'm getting odd readings though. When I log some data and look at it later I noticed that sometimes I get the exact same reading on damping channel at two consecutive times. The same happens with my velocity channel. Example: It might be 0.065v at 7.098 inches with a time of 0.12 sec. Then it might be 1.45v at 7.098 inches with time of 0.14. Also having slight problem with my conversion. Is that something I should consult Labjack? Link to comment Share on other sites More sharing options...
AzeoTech Posted December 7, 2016 Share Posted December 7, 2016 The first thing is probably something physical. But make sure the align threshold of your logging set is set to 0, or select "log time of all data points" (or something like that), so that it gives a time stamp for every column. I'm not sure what the problem is with the conversion so can't tell you if we can help or LabJack should. Link to comment Share on other sites More sharing options...
Jimmy1125 Posted December 31, 2016 Author Share Posted December 31, 2016 Thanks for your help. I have got my conversions working properly now. My question now is about averaging. I would like to know if it's possible to average my load cell readings at each velocity measurement. I'm afraid the boxcar or any other would just average my whole plot giving me a flat line instead of an inclined line. I have a 60-2 tooth trigger wheel which I would like to have take a velocity and load cell reading at every tooth pulse. This would give me a repeatable test on every shock I test. Can you give me some direction on how to go about this. Link to comment Share on other sites More sharing options...
AzeoTech Posted January 4, 2017 Share Posted January 4, 2017 I'm not sure what you mean by average the load cell at each velocity measurement. Aren't you sampling these two at the same rate? As for the second part, for that you would really need to handle in hardware. If you are using a LabJack you can setup a stream that will sample with each pulse. Setting this up, however, is something to ask LabJack as it requires some configuration. But it will work, and more reliably than in software. Link to comment Share on other sites More sharing options...
Jimmy1125 Posted January 15, 2017 Author Share Posted January 15, 2017 Thanks. I've been scouring the forums for information on reading logged files. Can you load a logged.csv file with Express? Link to comment Share on other sites More sharing options...
AzeoTech Posted January 18, 2017 Share Posted January 18, 2017 Yes, just use the File. functions, probably File.Open(), file.ReadDelim() and file.close() Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.