Jump to content
  • 0

use of multiple Protocol UART-Ports via script possible (at different times) ?


Rolf_K

Question

I want to automate Measurements via AD2-WaveForms Script.
Therefore I need to configure at the start of the testsequence a Powersupply via Protocol-UART Interface (e.g. DIO0=Tx,DIO1=Rx).
(While the testsequence continues there are some AD2-measurements via the scope.)
At the end of the testsequence the script had to check some funcionality on the Equipment under test via another Protocol UART-Port
(e.g. DIO2=Tx,DIO3=Rx).
Is that possible ?
If yes, please can you give the scipt command to configure the DIO Pins to Rx (and Tx)?
The script command:
Protocol.UART.TX.preset.2
leads to ... Error in: "UART_example" line: 20    SyntaxError: Parse error  ...

Is there a more intensive script reference available as the online help?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Hi @Rolf_K

See the following:

clear() // clear Output log
Protocol.UART.TX.value = 0 // DIO 0
Protocol.UART.RX.value = 1 // DIO 1
Protocol.config() // apply configuration changes now
Protocol.UART.Receiver() // start receiver
wait()
Protocol.UART.Send("hello") // TX
wait(0.1) // 100ms wait for RX, depends on the external device and rate
print(Protocol.UART.Receive()) // RX

/// ...
Protocol.UART.TX.value = 2
Protocol.UART.RX.value = 3
Protocol.config()
Protocol.UART.Receiver()
wait()
Protocol.UART.Send("ola")
wait(0.1) 
print(Protocol.UART.Receive())

 

Link to comment
Share on other sites

fantastic ! Both: the Tool and the support ! Thanks a lot.
Further Question:
Is it possible to read the Temperature of the AD2 via script:
I did a lot of search and tries via code completion but couldn't find it.
 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...