取消
显示结果 
搜索替代 
您的意思是: 

Unflatten From String Not Functioning in Mobile Module 2011

Mobile Module does not get updated since version 2011. I am not sure my question will be solved. 

 

Unflatten From String.jpg

 

I have been using Simple Messaging Reference Library (STM) for a couple of years. I use them in my Mobile Module code too. It has been working fine until lately I updated to the latest version of STM.

 

I noticed that 'Read Message (TCP).vi' was not functioning properly in the Mobile Module code. After a long debugging, I found the source of the problem. 'Unflattern From String.vi' does not work in Mobile Module any more. I did a test as shown above. 

 

My questions are

 

1). 'Unflattern From String' was changed so it is not supported in Mobile Module 2011?

2) Why the same code worked before, but not now?

 

I use LabVIEW 2011 and Mobile Module 2011. Thanks. 

0 项奖励
1 条消息(共 10 条)
3,548 次查看

Based on that screen shot, you have a lot of issues.  The string length should be a lot more than 0.  At the very least, it should be 4.  Did you not run this VI before taking the screen shot?  And that loop there is completely unnecessary.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 项奖励
2 条消息(共 10 条)
3,533 次查看

@MengHuiHanTang wrote:

Mobile Module does not get updated since version 2011. I am not sure my question will be solved. 

 

Unflatten From String.jpg

 

I have been using Simple Messaging Reference Library (STM) for a couple of years. I use them in my Mobile Module code too. It has been working fine until lately I updated to the latest version of STM.

 

I noticed that 'Read Message (TCP).vi' was not functioning properly in the Mobile Module code. After a long debugging, I found the source of the problem. 'Unflattern From String.vi' does not work in Mobile Module any more. I did a test as shown above. 

 

My questions are

 

1). 'Unflattern From String' was changed so it is not supported in Mobile Module 2011?

2) Why the same code worked before, but not now?

 

I use LabVIEW 2011 and Mobile Module 2011. Thanks. 


Is that the real code or just a mockup to demonstrate the issue?  I'm asking because the code is set up to run once and then wait until the stop button is pressed.  Then the VI will complete and exit.  Is the the desired behavior?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 项奖励
3 条消息(共 10 条)
3,519 次查看

For one thing this code won't produce meaningful results even if everything works fine. Basically your string contains a flattened I32 and then a flattened I16 followed by the String Data. But you try to unflatten this to an I16 which will take the 2 MSB from the I32 length (which always will be 0).

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 项奖励
4 条消息(共 10 条)
3,489 次查看

Unflatten From String.jpg

 

I changed the code as shown above. The point I was trying to make was that 'Unflatten From String' does not function correctly in the Mobile Module code. As in this case, it returns the I16 value '2', but throw away the rest of the string. 

0 项奖励
5 条消息(共 10 条)
3,472 次查看

This code is running in a Windows Mobile Device. I need that loop there so I can see the results. 

0 项奖励
6 条消息(共 10 条)
3,471 次查看

That picture simple shows what the original code looks like. It runs in a Windows Mobile device. The loop is there simply to view the results. 

0 项奖励
7 条消息(共 10 条)
3,468 次查看

I remember some post elsewhere about this. There I believe it was on a realtime system for an older LabVIEW version (possibly around 2009-2011), so the bug is probably not just limited to the Mobile Module alone. The workaround was to explicitedly split the flattened string yourself before passing it to Unflatten.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 项奖励
8 条消息(共 10 条)
3,465 次查看

the part that really confuses me is that the same code worked fine before. Only after I updated the STM library did this issue pop up. But the 'Unflatten From String' is a LabVIEW basic function, so it should not have changed. I am still using the same version of LabVIEW 2011.

 

Just weird. Now I have to find a workaround like you said.

0 项奖励
9 条消息(共 10 条)
3,454 次查看

@MengHuiHanTang wrote:

the part that really confuses me is that the same code worked fine before. Only after I updated the STM library did this issue pop up. But the 'Unflatten From String' is a LabVIEW basic function, so it should not have changed. I am still using the same version of LabVIEW 2011.

 

Just weird. Now I have to find a workaround like you said.


Well you upgraded STM so it is quite likely that the change is in there. Maybe the new version adds a feature that appends some extra data after the initial flattened element and uses the "remainder" from Unflatten for this. If the old STM library only had a single flattened element there, then there wouldn't have been any use of the remainder output of course.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 项奖励
10 条消息(共 10 条)
3,439 次查看