Jump to content

Recommended Posts

how to read the last text using visilogic proscan seem my existing readout are not able to capture the next line which is the "Ack". As you can see in hyper terminal, the "Ack" capture on the next link however It seem the proscan auto line break after receiving up to 32". Can anyone help?

 

AT command read out unable to show text on the next line.png

Share this post


Link to post
Share on other sites

sorry is protocol scan in full. I'm using this protocol to rewrite a program for 4G modem so far everything is working however the last text is what i need to capture to compare whether this is a valid text send by user to perform acknowledgement. Please help thanks.

protocol scan.png

Share this post


Link to post
Share on other sites

You have an ETX of 0D+0A, so I'm assuming the modem is putting a CR + LF on the end of the string or this wouldn't work.  Your terminal screen shot seems to agree with this.

The SCAN block looks for the first matching Index on an incoming data stream.  As your Index 0 variable is a Stream type, it will be the one chosen.  Having a second Stream variable does not solve the problem.

The "Ack" on the terminal screen is a new string on a new line.  Are you resetting the SCAN block (reset MB 2403) as soon as you receive any string? 

If MB 2403 is on, the block is locked and you won't receive anything new.  I generally have code that copies the string out of the variable vector as soon as the Session Complete bit comes on, and then I reset the Session Complete bit to cock it for the next string.

You could make an entry at Index 0 that is simply "Ack".  Put your Stream variable at Index 1.  That way, you could check the value of MI 2723 when MB 2403 goes high to see if you got the "Ack" message (MI 2723 = 0) or something else that is not "Ack" (MI 2723 = 1).  If the incoming stream does not match anything in your table then MI 2723 will equal -1.

You might want to post your code.

Joe T.  

Share this post


Link to post
Share on other sites

Hi again,

So what should be the correct ETX for my case as this cannot be left blank. For my trying i have removed the OD from the ETX and change the receive command and reset buffer to be in manual trigger mode but i'm still not able to capture the last text. Appreciate if you can resolve my problem. 

930368195_removeOD.png.44f253e8ec30eb0afa8494f33cc14bfb.png1454486099_nextlinetextmissing.thumb.png.7447976bab672d007164180aaa6109ff.png

Share this post


Link to post
Share on other sites

I might be dumb this morning, but what is your reason for using  SB0?  This seems like a block in the process to me.

cheers, Aus

Share this post


Link to post
Share on other sites

The above program is done for step by step sending command to retrieve the text. i'm blocking it temporary so as to try the effect of clearing the buffer manually upon receiving the text so that i won't miss any of the text before clearing. mb347 is to perform manual reset. 

Share this post


Link to post
Share on other sites

Current program i'm adding the MB1149  to switch over to manual triggering. it was suppose to clear buffer once mb2403 turn on for the original program however joe mentioned that i might be clearing the buffer too fast upon receiving the text so i add this for the testing. So anyone can resolve my issue on the last text? ☹️

 1384886237_mb1149switchovertomanual.png.b3af1950540f726dad121fa1e79dceb9.png

Share this post


Link to post
Share on other sites

Hi all,

I have resolved the issue and confirm there is nothing wrong with 0D+0A for ETX or clear buffer issue.  Testing the read back using hyper terminal have no issue capturing  the full text from the modem however with the controller some text was missing. I guess is an bug issue from the controller.  Please see screen shot an "ackkk" i send back to the modem using my mobile and in return the controller reply back with text that come with my mobile number.  Case resolved. :lol: 

 971660443_receiveackkkandreplybackwithmobilenumberng.png.0ccd6f55c8b2dfa6edfe806b8090c808.png 

 

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...