Problem with zero 0 in string
VladaPUB
as it is !
In am trying to SEND_STRING to device from buffer, in facet when I receive sometfing from one device, i remove few bytes, and want to send it to another device.
Problem is that
SEND_STRING 0:1:0,somevariable
is sending UP TO ZERO !!!!!
Is there solution to solve this ?
Problem is that
SEND_STRING 0:1:0,somevariable
is sending UP TO ZERO !!!!!
Is there solution to solve this ?
Comments
-
In am trying to SEND_STRING to device from buffer, in facet when I receive sometfing from one device, i remove few bytes, and want to send it to another device.
Problem is that
SEND_STRING 0:1:0,somevariable
is sending UP TO ZERO !!!!!
Is there solution to solve this ?
I don't know if this is your problebem but
when doing IP that ports 1 & 2 are reserved.
Joe -
VladaPUB how do you know that you send it up to the zero?
is this zero a Hex number or an ascii code?
as far as i know, when you look in netlinx diagnostics with a Hex numbers coming in or going out, it will cut the string at $00 and won't show you the rest of the string altough there might be some other strings in the buffer coming in / going out.
Ronen -
This is a fairly well known problem, but it only affects your debug window, and terminal screen (send_string 0). The null character goes out the port just fine, you just won't see it on screen. Apparently the display routines use a library that terminates strings on a null, so when it hits the zero, it stops displaying it. But it's only a display error, the code still goes out the port.
-
If you want to verify that the Zero is being send, use RealTerm and set your PC up as a Telnet Server. Open an IP client in the Netlinx to your PC and send the string (SEND_STRING) to that device (Telnet Client). You should see that everything is fine.
-
You can also just convert your string before sending to 0.
STACK_VAR CHAR cProj_DeBug_Str[1024] ; nLenStr = length_string(DATA.TEXT) ; for(n = 1 ; n <= nLenStr ; n++) { if(n == 1) { cProj_DeBug_Str = "itoa(DATA.TEXT[n])" ; } else { cProj_DeBug_Str = "cProj_DeBug_Str,',',itoa(DATA.TEXT[n])" ; } } fnProj_DeBug("'RX STR (DECIMAL): ',cProj_DeBug_Str,' :DEBUG line-<',ITOA(__LINE__),'>'") ;
This will print out the ASCII representation of the incoming decimal values. Do the same for outgoing if you choose.Line 1 (09:54:52):: Video_Projector.axi: RX STR (DECIMAL): 34,1,0,208,0,243 :DEBUG line-<214>
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums
