Jump to content
Macro Express Forums

Newb With Questions Using Hyperterminal


odaen

Recommended Posts

good day. I'm trying to use macroexpress to pass simple text commands to some hardware and monitor responses via hyperterminal.

 

for example

 

I enter "ver<enter>" and receive "Base Station Rev 1.01b"

 

How do I monitor the response in hyperterminal and compare vs a known expected response?

 

 

 

edited for minor typo

Link to comment
Share on other sites

ok, I found a way around this, but don't know how to parse text from a text file to compare with "known good"

 

I can capture text to file from hyperterminal and have notepad open up the file indicating the command and the response. how do I parse the file for the response and compare against a "known good" string?

 

Then, I'll <CTRL>A and delete and then save the file.

 

Enter new command in hyperterminal, and repeat, parsing the text file, deleting the text, saving text file, etc.

Link to comment
Share on other sites

hi,

In brief, use "Text File Process" to string, say "T1"/ endprocess loop;

in the loop ; compare T1;

Variable Set String %T2% "Not Found"

// Put in your file path and name here

Text File Begin Process: "Answer.txt"

  If Variable %T1% contains "Known Good"

    Variable Set String %T2% "Found"

    // Exit here if you only need to find one instance

    Repeat Exit

  End If

Text File End Process

Text Box Display: After

<TVAR2:02:01:Not Found><REM2:Put in your file path and name here><BTFBEG:001:000001:000000:C:\Program Files\Macro Express3\Answer.txt><IFVAR2:1:01:7:Known Good><TVAR2:02:01:Found><REM2:Exit here if you only need to find one instance><EXITREP><ENDIF><BTFEND><TBOX4:T:1:CenterCenter000278000200:000:AfterT1=%T1%

T2=%T2%>

Randall
Link to comment
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.

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.

Loading...
×
×
  • Create New...