LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

STM read message on TPC-2106T target returns empty string

I'm using the STM component (2.0) for client-server command-based communication between an RT target (the server) and a touch panel computer (TPC-2106T)running Windows CE (the client).

messages sent from the TPC to the RT server via STM write message work fine.  However, the STM read message on the TPC client returns the correct metadata name, but the data is an empty string even though the data info cluster shows 54 bytes of data.  Does anybody have any ideas on how to fix this?  All software is LabView 2009.

Thanks,

Steve

Steve
CLAD
0 Kudos
Message 1 of 7
(4,627 Views)

Steve,
 
I downloaded the stm library and did some experimentation today. I had not previously used this before.  I started with the examples provided - the stm basic client(on tpc) and stm basic server(on pc) I was able to run it successfully on two test computers and transfer data, but once I passed it to a tpc-2106t, I was getting errors. The error I was recieving was 10060 happening at the TCP read in the subvi stm read meta data. This didnt seem to be happening because of flatten/unflatten. I changed the port numbers from 55555 to 828 as well, thinking there may be a port limitation on CE(I cant find documentation on this anywhere, from us or microsoft)
 
I then went to use the TCP example we provide in the example finder for touch panel targets, and it works perfectly. I do not have enough information right now to say if this is an issue caused by flatten/unflatten(since the example we have does the typecast) or other reasons...what I may have to do is track down who made the STM document you found(it was made in 2007). In the meantime, there is a support discussion forum thread linked on the stm download page that directs to http://forums.ni.com/ni/board/message?board.id=Components&thread.id=5&view=by_date_ascending&page=1

 

This issue is being looked into under SR#7271885.

 

For those of you unfamiliar, the stm library can be downloaded at  http://zone.ni.com/devzone/cda/epd/p/id/2739

Rob K
Measurements Mechanical Engineer (C-Series, USB X-Series)
National Instruments
CompactRIO Developers Guide
CompactRIO Out of the Box Video
0 Kudos
Message 2 of 7
(4,601 Views)

Well, it turns out that there IS a known issue in Touch Panel module (#161025) where unflatten from string does not return "rest of binary string".  The STM library Read Message VI uses the "rest of binary string" output from the unflatten from string vi to return the data string which is why STM read won't work on Win CE targets.

 

Steve
CLAD
0 Kudos
Message 3 of 7
(4,581 Views)

Thanks for finding that, Steve.

 

This is a known issue, but has an easy workaround - use typecasting instead of flatten/unflatten.  The examples we provide with LabVIEW Example Finder 'TCP - Touch Panel.lvproj' use typecasting and definitely work.

Rob K
Measurements Mechanical Engineer (C-Series, USB X-Series)
National Instruments
CompactRIO Developers Guide
CompactRIO Out of the Box Video
0 Kudos
Message 4 of 7
(4,556 Views)

I assume that you mean that we should edit all of the STM VIs by replacing the instances of "Flatten To/Unflatten From String" with the "Type Cast" functions. Unfortunately, in the "STM Read Meta Data (TCP Ref).vi" the meta data is passed as an array of strings, a data type that is not supported by the "Type Cast" function. Therefore it is not possible to simply make this replacement. I suspect a solution for this issue could be found, but I imagine that I am not the only person who has run into this problem. Has anyone produced a set of the STM VIs that will work on a touch panel using Windows CE? Is NI planning to address this anytime soon? If not, then are there any suggestions for how to handle this?

William Griffin
NI Certified LabVIEW Architect
NI Certified Professional Instructor
Spark Embedded
https://sparkembedded.com/
0 Kudos
Message 5 of 7
(4,318 Views)

William:

 

This is currently being worked on by R&D under the CAR # that Rob mentioned, but since this is a DevZone library (and not a full-fledged toolkit), it isn't fully supported or being continuously worked on (necessarily).

 

If you're dealing with an array of strings, you'll need to put the type cast inside a for loop and auto-index the array of strings to get it to work on the TPC.

 

Hope that helps!

Caleb Harris

National Instruments | http://www.ni.com/support
0 Kudos
Message 6 of 7
(4,280 Views)

William,

 

The CAR# that is active is for the touchpanel software, this doesnt seem to be an issue with the library itself. I think what Caleb was saying is that the toolkit itself works on most of our targets, with the touchpanel being a very small subset, so a change in that devzone code is very unlikely. I can understand your frustration, however, with the library not working on this particular target. Unfortunately, until a fix is found for the TPC code that allows for the unflatten, we will have to workaround this issue in code with some clever coding.

 

I added the situation with the STM library into the notes for the CAR and also this discussion forum thread link as well for better visibility to our developers.

Rob K
Measurements Mechanical Engineer (C-Series, USB X-Series)
National Instruments
CompactRIO Developers Guide
CompactRIO Out of the Box Video
0 Kudos
Message 7 of 7
(4,274 Views)