OliS Posted September 1, 2021 Share Posted September 1, 2021 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 Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted September 1, 2021 Share Posted September 1, 2021 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)) Quote Link to comment Share on other sites More sharing options...
OliS Posted September 2, 2021 Author Share Posted September 2, 2021 Yea it was the carriage return, cheers! Quote Link to comment Share on other sites More sharing options...
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.
Note: Your post will require moderator approval before it will be visible.