khuenguyen Posted October 25, 2010 Share Posted October 25, 2010 Hi all, I have a circuit (very simple for test), my circuit can communicate with hyperterminal program on windows XP via COM port. At screen of HyperTerminal, I send command AIxMy (with x: 1->3, y: 0->31), I will receive AIxMyV4.235 (here V is Volt), I have some other commands but structure command is same above. Now, I want use DAQFactory to communicate with my circuit to execute work above. But, I don't known how start? Please help me. note: this circuit is very simple for test and demo with customer, My main project is monitor all parameters for BTS of operators in Vietnam (example: temp, Volt, fire, ...). Parameter for COM port: BaudRate: 9600, Databit: 8, Stopbits: 1, Parity: none. Thanks. Link to comment Share on other sites More sharing options...
AzeoTech Posted October 25, 2010 Share Posted October 25, 2010 The Serial and Ethernet Communcation Guide installed with DAQFactory walks you through the basics and should get you at least to the point where you can type the command into the monitor and get a response. Link to comment Share on other sites More sharing options...
khuenguyen Posted October 25, 2010 Author Share Posted October 25, 2010 I try with Serial and Ethernet Communication Guide but It doesn't work. I don't receive anything but I still receive data with hyperterminal. Link to comment Share on other sites More sharing options...
AzeoTech Posted October 25, 2010 Share Posted October 25, 2010 Is hyperterminal still open? You can't run hyperterminal (or any other program accessing the serial port) at the same time as DAQFactory. Link to comment Share on other sites More sharing options...
khuenguyen Posted October 25, 2010 Author Share Posted October 25, 2010 When I use DAQFactory, I disconnected HyperTerminal. I sure that haven't any program use COM port when DAQFactory running. Link to comment Share on other sites More sharing options...
AzeoTech Posted October 25, 2010 Share Posted October 25, 2010 Do you get any alerts in the command alert window? Link to comment Share on other sites More sharing options...
khuenguyen Posted October 25, 2010 Author Share Posted October 25, 2010 First, I chose Device Configuration -> New Serial (RS232/485)/Ethernet (TCP/IP) device -> in "Device Name", I type my name, continue, I choose New Serial (RS...) but I don't known protocol in "Protocol" windows. I try with Null Protocol. I don't see any alert. Link to comment Share on other sites More sharing options...
AzeoTech Posted October 25, 2010 Share Posted October 25, 2010 NULL is fine, though really at this point you don't even have to select a protocol. Just highlight the serial port you created and click Monitor. Then you can type your command. Note that DAQFactory DOES NOT add carriage return / line feeds automatically to the end which hyperterminal does when you hit enter. To add a CR/LF to the end, put backslash 013 then backslash 010 at the end of the string. Sorry, but the backslash character can't be displayed easily on the web and this forum. Link to comment Share on other sites More sharing options...
khuenguyen Posted October 25, 2010 Author Share Posted October 25, 2010 I still don't receive any thing at monitor windows. I added 1310 at the end of my string. I still execute success command with HyperTerminal. Link to comment Share on other sites More sharing options...
AzeoTech Posted October 25, 2010 Share Posted October 25, 2010 Sorry, the backslashes got stripped. It should be \013\010 Link to comment Share on other sites More sharing options...
khuenguyen Posted October 25, 2010 Author Share Posted October 25, 2010 Thanks you very much, I sent and received data successful. But, After I sent one command, I cannot continue sent second command. DAQFactory notify COM port busy. In my circuit have some output connect with some motors, I want have some buttons on page_0,1,... When I press button, motors will start, please help me create buttons. Link to comment Share on other sites More sharing options...
AzeoTech Posted October 25, 2010 Share Posted October 25, 2010 Start with a blank app and manually type in your commands into the monitor. Do you still get port is busy? Link to comment Share on other sites More sharing options...
khuenguyen Posted October 25, 2010 Author Share Posted October 25, 2010 This problem solved. Now, I am creating button, graph, and database for application. I created two buttons, one for ON motor, one for OFF motor, they work normal. But, I want merge them become only button. Can you guide me. Thanks. Link to comment Share on other sites More sharing options...
AzeoTech Posted October 26, 2010 Share Posted October 26, 2010 You need to check the state and run different script depending on which state its in. You can do this right in the event for the button, or do it in a sequence that you call from the button. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.