AJ123 Posted September 11, 2012 Share Posted September 11, 2012 I am trying to write a sequence so that I can have DAQFactory read the pH of some water, then based on that pH turn on a pump that will have either a base or an acid depending on which direction I am going. I am not sure where to start. If this is a logging problem or if I can write a simple while sequence. What i have is a labjack U3-HV connected to a pH probe in my sample. I am pretty new to scripting Link to comment Share on other sites More sharing options...
AzeoTech Posted September 14, 2012 Share Posted September 14, 2012 You'll actually want to put the script in the channel that holds the pH. I'll assume its called pH. The script might be something like: if (pH[0] < 5) basePump = 1endifif (pH[0] > 10) acidPump = 1endifif ((pH[0] > 6) && (pH[0] < 9)) basePump = 0 acidPump = 0endif[/CODE] Link to comment Share on other sites More sharing options...
AJ123 Posted September 14, 2012 Author Share Posted September 14, 2012 I am having an issue getting the pH probe to actually read a value in DAQFactory. I went through the labjack streaming panel and I saw that it is all hooked up correct and that I have the correct channel as the voltage changes when I change to different know pHs. I have it set up as a channel in the page with everything labled, channel name the device but I can't get it to actually read any values. I have it set as the I/O type as a Dig In is that correct? Link to comment Share on other sites More sharing options...
AzeoTech Posted September 14, 2012 Share Posted September 14, 2012 No, it is almost certainly an A to D input. Dig In would be 0 or 1 only (digital). Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.