LabVIEW to BS2px24 Communication USB
Thanh Vo
Posts: 2
I need to send data from LabVIEW to Basic Stamp by using SRIN command.
How could I setup?
Thank you,
Thanh V0
How could I setup?
Thank you,
Thanh V0
Comments
Example code:
Delay VAR Byte(4)
PulseDelay VAR Word
PulseWidth VAR Word
PulseWidth = 1500
Counter VAR Word
RX VAR Byte
RX=16
SerialInput:
SEROUT RX, 17405, [noparse][[/noparse]"A"]
SERIN RX, 17405, [noparse][[/noparse]Delay]
PulseDelay = Delay
Main:
IF (IN1=1) THEN
FOR Counter = 1 TO PulseDelay
NEXT
PULSOUT 15, PulseWidth
DO WHILE (IN1=1)
LOOP
ENDIF
· IF (IN3=1) THEN
· FOR Counter = 1 TO PulseDelay
· NEXT
· PULSOUT 14, PulseWidth
· DO WHILE (IN3=1)
· LOOP
· ENDIF
SEROUT RX, 17405, [noparse][[/noparse]"A"]
SERIN RX, 17405, [noparse][[/noparse]Delay]
PulseDelay = Delay
GOTO Main
END