UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor
524 Views
Registered: ‎06-20-2018

xsdbserver listen to incoming commands

Jump to solution

Hello 

 

my application requires MATLAB to send commands to xsdb console continuously. 

this was done initially using

 

xsct.bat <file_name>.tcl 

 

 

while this works, there are limitations due to MATLAB which requires us to send COMMANDS directly to xsdb instead of sourcing tcl files.

 

After some study, I think maybe xsdbserver could be used, which constantly listens to commands from MATLAB. So I first set up xsdbserver in xsct console using the following command

 

 xsdbserver start -host localhost -port 2000

 

 

Then I set up MATLAB TCP IP object and send text strings

 

t = tcpip('127.0.0.1', 2000, 'NetworkRole', 'client')
fopen(t)
fprintf(t,'%s','connect')
fprintf(t,'%s','targets 6')

 

After checking, I don't think that these commands were sent properly. 'targets 6' was not set up properly. 

 

Can you help me point out what is wrong? 

 

Thank you

 

0 Kudos
1 Solution

Accepted Solutions
Contributor
Contributor
510 Views
Registered: ‎06-20-2018

Re: xsdbserver listen to incoming commands

Jump to solution

So I restarted xsct. restarted xsdbserver. 

 

It is working now.  

 

These codes work in MATLAB with xsdb. 

 

t = tcpip('127.0.0.1', 2000, 'NetworkRole', 'client')
fopen(t)
fprintf(t,'%s\n\r','connect')
fprintf(t,'%s\n\r','targets 9')
fprintf(t,'%s\n\r','version')

 

0 Kudos
2 Replies
Xilinx Employee
Xilinx Employee
499 Views
Registered: ‎10-21-2010

Re: xsdbserver listen to incoming commands

Jump to solution

Hi,

 

For every command, xsdbserver server sends a reply back in the format "okay <result>" or "error <msg>". Have you checked if you're receiving any such replies?

0 Kudos
Contributor
Contributor
511 Views
Registered: ‎06-20-2018

Re: xsdbserver listen to incoming commands

Jump to solution

So I restarted xsct. restarted xsdbserver. 

 

It is working now.  

 

These codes work in MATLAB with xsdb. 

 

t = tcpip('127.0.0.1', 2000, 'NetworkRole', 'client')
fopen(t)
fprintf(t,'%s\n\r','connect')
fprintf(t,'%s\n\r','targets 9')
fprintf(t,'%s\n\r','version')

 

0 Kudos