TCP speed not logged

Hi all,

I'm trying to log the TCP speed of my simulation, by linking it to the system output 'TCP speed'. This is all fine and if I add the value in the rapid watch I can see that it actually gets the TCP speed, but when I try to log everything to a .csv file, so I can make a graph of it, I only log 'TCP Speed: 0'. It comes down to this: I see there is a value in the variable but I can't get logged in the Excel sheet.

Programmed:
VAR num TCPSpeed; (I tried both as a 'num'- and 'signalao'-variable

TCPSpeed:=AOutput(aoTCPSpeed);
rWritelog "TCP SPeed: "+valToStr(TCPSpeed);

result in logging = TCP Speed: 0

I think something is wrong with the 'TCPSpeed'-variable, because I don't see this change to anything else than 0.

Thank you!!

s084706

Comments

  • lemster68
    lemster68 United States ✭✭✭
    edited February 2020
    In your log file is it being written repeatedly or just the one line?  If it is just one line you probably left off the \Append optional argument.
    Lee Justice
  • s084706
    s084706 Belgium
    edited February 2020
    lemster68 said:
    In your log file is it being written repeatedly or just the one line?  If it is just one line you probably left off the \Append optional argument.
    Hi @lemster68

    It is written down repeatedly, so I don't think that there is anything wrong?


  • lemster68
    lemster68 United States ✭✭✭
    OK, so what I think you should do is force a value into the AO in teach.  Then single step through, line by line while you observe changes (or lack of), in your variables.  Best troubleshooting practice most of the time.
    Lee Justice