LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pls...tell me how to program to send the responses for each command,such the every new command is coming after receving the response of previous command

hi all
pls...tell me how to program to send the responses for each command,such the every new command is coming after receving the response of previous command
regards
nitin
0 Kudos
Message 1 of 7
(2,966 Views)

I'm not sure of exactly what you mean, but it sounds like you need a loop that sends a command, waits for the response and then has a case statement that takes that response and creates the appropriate command for the next time through the loop. Is this what you are asking about?

P.M.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 7
(2,957 Views)

hey pm

i 'm not sending the commands.rather i am waiting for the data stream (from  host like mobile )having a command and then comparing  the data stream with the know command  set  n finally once i know the which command came in data stream i will send the response to the host.again the host will send the data stream having same or other type of command n again i hv to send the data... this will will keep on repeting untill host have no more queries (command).

regrds,

nitin

 

0 Kudos
Message 3 of 7
(2,948 Views)
You've asked the same question in several different forums and several different times in the same forum. You need to provide a lot more information. What exactly is the data stream that you're trying to read and where does it come from. What are you trying to read it with. What is the format of the data stream (analog, digital, text, or whatever)? What exactly is the problem you're having? Do you wish to know how to decode/parse the information, how to frame a response, how to wait for a command? Your question is rather broad as it is right now.
0 Kudos
Message 4 of 7
(2,943 Views)
If you are using the serial port, the attached vi should help you get started.  Wait for bytes to be received in a loop.  When received, read the port.  Form the next command depending on what is received and then write it to the port.  Repeat.  Use a timeout to prevent an infinite loop.
- tbob

Inventor of the WORM Global
0 Kudos
Message 5 of 7
(2,931 Views)

hi!

the data stream is of stream of binary bits. This data will come from the phone output line.first i will capture this binary data stream.,In this binary stream of the data, we will have 6 byte of command. i know in advance that  incoming command in this data stream will be 1 of the 4 known command .SO ,I  have to know ,first ,which command is coming in the data stream(by matching the pattern of 6 known commands ) then i will send the known response to the mobile back on other line ( output line of the pci-6221 card,say,port0--line1). then host will again send 1 of the 4 known command ,after receiving the response. this process will repeat for 5 times till phone won't send any more command and hence i don't have to send any more response.

if possible pls send me the basic skelton of the same.

regards

nitin

0 Kudos
Message 6 of 7
(2,918 Views)
If reading binary bits from a phone line, you must have a modem to convert the tones to data bits.  Doesn't the modem connect to the serial port?  Initialize the modem then use the vi I have attached.  Make modifications on the part where a response is sent based on the data received.  The rest is the same.
- tbob

Inventor of the WORM Global
0 Kudos
Message 7 of 7
(2,896 Views)