Shop OBEX P1 Docs P2 Docs Learn Events
Serial Communication with Labview - Please Help! — Parallax Forums

Serial Communication with Labview - Please Help!

chaitanyachaitanya Posts: 1
edited 2006-08-09 02:14 in BASIC Stamp
Hi,

I have been trying to solve a communications issue between my BS2p40 and LabVIEW program for the longest time and seem to be going nowhere. I am using the basic stamp in a feedback loop that controls the temperature of thermoelectric coolers. In this loop, LabVIEW is supposed to take readings from a thermocouple reader and then send commands through the serial port to the basic stamp. The code is in the format X Y, where X is a number from 0-4 and Y is either i, m, or d, and the two are separated by a space (for example, 0 i is supposed to increase the voltage to the thermoelectric cooler on channel 0).
Now my labview code works (i have tested it by seeing the serial output on an x86 device that I had made) and it outputs the correct codes for each channel, and my basic stamp code works as well - I tested it using hyperterminal and it worked correctly. The great part is that the two together dont work... I have tried a lot of different settings and combinations to see what was causing the issue, but I cant pinpoint it. When the labview program runs, the stamp does nothing but pulse AAAA on the main i/o ports and FFFF on the aux ports each time labview sends a command (this was checked using a logic probe). I tried to change the baud, but that didnt do anything, and I thought the speed at which data was being sent by labview might be an issue (i typed in charachters in hyperterminal), so i made hyperterminal send a file consisting of only 0 i, and it worked. I have attached my pbasic code and my labview code below in case it is needed... i am also not using a development board but the control circuit that I had made for the coolers, and I am pretty sure that the serial connection was properly set up (I could program the stamp).
I would greatly appreciate it if someone could help me on this project.... i have been held up by it for so long, and it is part of a much larger research project that I need to finish soon!

Once again, thanks for your help!

Post Edited (chaitanya) : 8/9/2006 12:40:38 AM GMT

Comments

  • KatyBriKatyBri Posts: 171
    edited 2006-08-09 02:14
    When I was programming with LabView and had problems similar to the ine you are having, the problem was almost always one of a communication parameter or speed missmatch. You should set up LabView and your STAMP software to talk-back after sending/receiving a command/data. Check each reply, and if acceptable, go to the next send/receive. Also, make sure your line levels are the same.
Sign In or Register to comment.