![]() ![]() ![]() #HYPERTERMINAL 7 SERIAL SERIAL#You will then see all the data sent out by the logger and received by it on that serial port along with a timestamp (logger time). Select the port the sensor is connected to and answer the follow up questions (ASCII or Hex). You will then be asked which serial port to monitor. Open a terminal session and then press enter a few times until you get the CR1000> prompt back. #HYPERTERMINAL 7 SERIAL SOFTWARE#To use this connect to the datalogger either with our standard software or hyperterminal (or similar). One additional tip which is a useful tool for anyone debugging these systems is to use the dataloggers special serial sniffing mode (the W command in the terminal mode). There is a plan to produce an online tutorial for dealing with serial sensors, but it is still in the works I believe. I am afraid I do not know anyone else working with these specific sensors, may be some other Forum users do. With that type of construct you will at least see something in the TempInString. 'Terminate this when we see character 10 (LF) or hit 255 characters. 'The next thing in the buffer should be the data. 'Wait for up to 1 sec for the initial ack. 'Send the outstring and wait for the sensor to echo the "#" followed by CR LF. 'Now flush the buffer to get rid of unwanted stuff #HYPERTERMINAL 7 SERIAL CODE#You could try replacing your code with this: However, as you are running in polled mode you know when the data is coming back, so you can use a simpler construct of flushing the serial port (Serialflush), sending out the command (serialout), then using SerialIn to read the data. It also has this special mode of operation in pipeline mode that is designed for capturing high speed data but that can be difficult to synchronise with anything other than the SerialOutblock commands in pipeline mode. ![]() It may help you initially is to not use the Serialinrecord instruction, which is neat when it works, but as it will not return anything if the start and end characters are not there, can be difficult to debug. One other thing to try in sequential mode is to set the first parameter of the delay to 1 as serial instructions should then be dealt with as processing instructions, so your delays may not be working. Because this is an obvious difference between the temp sensor and the other sensors. I assume that is has something to do with the # that comes before the data string. I do not get any data in from the temp sensor. SplitStr (TempInStringSplit(),TempInString,"",4,0) ' split and take numeric data only SerialInRecord (COM3,TempInString,&H4D,0,&H0D0A,NBytesReturnedTemp,01) '&H4D is M &H0D0A is CR LF SerialOut (COM3,WakeUpString,"",0,100) 'wake up When I connect the temp sensor to a PC with hyperterminal I see a little difference in the protocol.Īfter the polling command "do_sample" it responds with # and CRLF first before the datastring comes out -> lines copied from hyperterminal: All sensors work in polling mode and send ascii data via RS232. Oxygen and conductivity sensors work fine, but from the temperature sensor I do not get data in. I have a project with different types of sensors from Aanderaa (deep sea sensors).Īll should work in the same way. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |