Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

connection problems in CRBasic programs with strings


smile May 31, 2016 08:30 AM

Dears

this is what happens.
In some programs we declare locations as strings and when connected to the station, as long as not change a value of location in numeric, everything works fine.

But after a change of value for one of any location, the numeric display and the connection, crashes. I can see, looking the data stream via the " low lewel log I / O for X com port", that immediately after this location change, starts with a large and fast data stream that lasts even some minutes or minus, when this stream (dots and few ASCII characters) stops, the numeric display and the connection, return to normal.
The strange thing is that, closing the numeric display and connect, don't interrupted the data flow . If you do not want to wait until the flow stops by itself and for example, we are locally connected, you must disconnect the cable from the logger (RS232 or CSIO). Just see that the data stream is interrupted, then you can reconnect both the cable and the SW and everything re-continues fine.

thanks to all

Regards

Smile


JDavis May 31, 2016 03:23 PM

When you close the Connect screen, Loggernet will finish the last communication transaction it was working on.

If you declared large strings in your Public table, it takes a lot longer for the Public table to be retrieved by Loggernet. My guess is that is the cause of the problems you are having. There is no inherent issue with setting strings using the Table Monitor or Numeric displays. It is a feature I use quite often. Using a lot of strings or big strings in the Public table slows things down a lot.

Keep in mind that Floats and Longs use only 4 bytes each. The default size of a string is 24 bytes. That is 6 times as much data per value. If you declared a string of 1024 bytes, that is as much data as 256 Floats.


smile Jun 1, 2016 08:35 AM

Dear JDavis many thanks for your reply.

I tried, whether declared as "dim", the strings do not generate delays, if not important in the public table, this could be a solution? what do you think about it?

thanks again

Regards

Smile


JDavis Jun 1, 2016 02:22 PM

Yes, declaring variables with Dim if you don't need to see them in the Public table is a good way to shorten the polling time.

Log in or register to post/reply in the forum.