Just getting echo on serial port


Recommended Posts

Hi, I want to use DAQfac to repeatedly poll a device for info using the same command, and store this data. This command works fine using putty or teraterm etc, (you get the results and no echo) but when I open a serial monitor window in DAQfac with the same baud settings etc. and try it, I just get an echo of the command and nothing else - do you know what I might be doing wrong? 

Just to help, let's assume I'm a dumbass who has no idea what they're doing ok, cheers

Link to comment
Share on other sites

The mostly like issue is lack of an end of line character.  Terminal programs typically generate either a carriage return (ascii 13), or line feed (ascii 10) or both when you hit the enter key.  Because DAQFactory works with both ASCII protocols and binary (which terminal programs can't handle), it does not automatically add any characters.  To add a carriage return in the monitor, add \013, or for line feed \010.  That will tell your device that the line is done and that it should respond.  Note that in script you will typically use chr(13) and chr(10) instead, i.e.:

device.mydevice.write("some string" + chr(13))


Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.