-
Posts
47 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by Zyl
-
Hi everybody, I'm actually running on a problem with a TCP connection between 2 cRIOS. One cRIO is a server which writes 76 bytes long messages every 10ms (today, but can be anything between 1ms and 1s) using STM Write VI (so at the end it pushes 82 bytes long message in the TCP write function). I want that message to be sent only if the client as time to read it, so I set the timeout to 0. The other cRIO is a the client with tries to read on the TCP link at a speed of 1000Hz (1ms, Wait next Multiple used to ensure that the loop is not running faster). I use the STM Read VI to get the data sent from the other cRIO. The read function has a timeout of 100ms. What I was expected is that the client loop would actually runs at 10ms rate (server writing rate) due to the 100ms timeout. And if the server writes faster, it would follow the server rate. If the server rate is greater that 100ms, error 56 would be fired, and I would handle it. What happens is that the server writes the 82 bytes every 10ms. But the client loop is always getting data and runs at 1ms ; which means that the timeout is not respected ! I disabled Nagel algorithm on the server side to be sure that the message is sent when requested, but it didn't help. The client acts like there is always data in the read buffer. Even if it can be right for the first iterations, I would expect that running at 1ms rate, the client would empty the buffer rapidly, but it seems that it never ends... Moreover, the longer the server writes, the longer it takes for the client to see empty buffer (timeout reached again and error 56) when the server is stopped (but connection not closed). Does somebody already ran into this issue ? Any idea on how I can solve this ? Server code is attached to the post. 2 TCP connections are established between the server and client (so same IP address, but different ports), but only one is used (upper loop). The other opens and close immediately because EnableStream boolean is always false.
-
Hi everybody, After posting my problem on NI forum, I couldn't get any hints to achieve what I want to do. Here is my problem : I'm buiding a TS Operator interface which can display several distinct execution at the same time (modified // processmodel). Each is displayed in a specific ExecutionView in an independ window (TestSocket ExecView). Each ExecutionView is realted to its own ExecView Manager. I'd like to create a another window (Supervision window) which lists all running executions (within standard TS ListBar) and when I chose an execution from the ListBar it displays the corresponding execution (and related components : callstack, variables, etc...). So I'll have the same execution displayed into two different ExecutionView (each ExecutionView being related to its own executionView Manager). The problem is that each time I interact on the same execution (pausing, terminating, showing it), the execution is re-sent to my supervision ExecViewMgr. This seems to disconnect the TestSocket execView from the current execution. Do you know if it is possible to display the same execution in 2 different ExecutionView ? Does anybody achieved the same functionnality before ?
-
Dynamic dispatch & Shared reentrancy
Zyl replied to Nicolas Bats's topic in Object-Oriented Programming
Hi QueueYueue, More I'm reading this thread and less I'm understanding the reentrancy problem hidden behind the dynamic dispatch. Maybe you can help me to understand how things work under the hood. I agree that you cannot know @ edit time which instance of VI that has to be launched when using dynamic dispatch VI, but you know it @run time ! Let's assume that you are using a standard dynamic dispatch VI (reentrancy set as 'shared'), what happens the very first time that child VI is called ? I guess that, at the time of executing the VI code, LV allocates the memory needed for this specific child... No ? If LV can do it once in 'shared' mode, why it cannot do it every time you would call a 'pre-allocated' child VI ? Reentrancy does not concern the way you launch an execution, but how you manage the memory allocated with previous launch. When using a 'standard' VI, you call it using VI server by path. You can even build the path at run-time, open a reference on the VI w/option 0x40 and launch the execution of an unknown VI at runtime as reentrant in 'pre-allocated' mode... -
Hi Rolf and Jeffrey ! Thank you very for responding that fast ! Indeed, if a hacker really wants to break the code, he will at the end find a way to do it. The idea behind my question was to know if there was anything that could be done easily and that can reassure my customer. So I think I won't dive into Mariana Trench for this project ( ) but the dongle solution can be something nice ti have !
- 4 replies
-
- protection
- encryption
-
(and 1 more)
Tagged with:
-
Hi, One of my customer is creating systems with high added value. These systems relies on a both CompactRIOs and deported computer code. These systems will be deployed all around the world, and should be hardly protected against copy. Concerning the computer code, they decided to use a dongle system to decrypt the exe each time this one is launched. How to do something similar with the RTEXE on a compactRIO ? Is there a solution to encrypt an RTEXE ? Is it possible to remove VI's block diagrams in a RT EXE ? Is this solution sufficient to protect the code from reverse engineering ? Any advice will be welcomed ! Thanks !
- 4 replies
-
- protection
- encryption
-
(and 1 more)
Tagged with:
-
Just to let you know, I modified my code to fit with the 'suggested architecture'. It results in : No more window blocking My main window (mother window which contains a subpanel, in which my screens are loaded) terribly hangs !! (1 or 2 seconds before mouse click or window move becomes effective). Which implies that my whole software seems to lag... not very nice for my end users... Do you have any suggestions to improve this ?
-
With pic attached, it's always better ! Update : NI suggested to me to modify my architecture to fit with the architecture shown is 'Architecture_Suggested.png'. What do you think of it ?
-
Hello all ! Here is a post that I created 2 days ago on NI forums : http://forums.ni.com/t5/LabVIEW/LabVIEW-windows-blocked-when-TS-Engine-used-as-a-process/m-p/2324742/highlight/false#M729301 My problem is that I'm currently building a software program requiring TS to be THE execution engine. I mean that almost all actions of playing VIs, sequences, and so on are based on a TS execution. I then decided to use my traditionnal application framework (see pic attached). And I'm facing a weired issue : if TS is run as a process (running in background), my main window acts like if it was modal. And then, when this main window is closed (end of execution), all other LV windows (lvproj, VI opened, ...) are not responding to mouse actions (I can't move the windows, click on buttons, ...) but react to keyboard actions... A guy from NI respond that it's caused TS API ActiveX components, and I shouldn't use it the I want to use it... Do you agree with him or is there something going wrong somewhere ?!
-
Hi Asbo, Indeed this is what I was thinking. According to this supposition, I really don't understand why the change count has to be modified to refresh the seq editor interface... And yes, it goes back to zero when the file is unloaded/reloaded. Thanks.
-
Hi all, I am using SVN to control its sequence file versions. All steps in the sequence files are steptypes. And they all are settable via edit steps. One problem is that, when you set your step via edit steps, TS UI isn't refreshed so the programmer might think that the edit step failed programming the step. See this NI TestStand Idea Exchange thread : http://forums.ni.com...p/idi-p/1753456 (please Kudo if you think the idea is great... ). So NI advices to generate an IncChangeCount to force TS to refresh its interface. This method makes the sequence file to be seen as 'changed' (star next to its name in the TS tabs). When launching an edit step, it loads the current programmed values of the step to display them on the edit step interface. If the user doesn't change them and the IncChangeCount is generated, then the file is seen modified ( ) and the 'Change counter' is incremented. In these conditions, SVN doesn't detect any change to the file !! This would mean that the 'change counter' is not stored in the file... Do you have any idea on where it could be stored ?
-
Storing Initialisation Data in a Strict Typedef
Zyl replied to Zyl's topic in Application Design & Architecture
Hi Neil, If you drag'n drop the cluster on your diagram, the constant created will keep the values set in the control definition. In LV 2011, it seems that, even if you modify the cluster, the set values are kept while the new values (from the new added controls) are set to 'void'. As my cluster is only used as a constant for initialization values, if I modify it, I only have to check it once in my code... But indeed, for a question of 'security', I guess it's better to explicitly bundle constant values into the configuration cluster. Hi Paul, Having to two files is, for me, not a good solution. If both files (configuration.xml and ConfigurationDefault.xml) are deleted, then you need to re-send files to the cutsomer. Which takes time... and time is money ! Hi Crelf, I took a look at EasyXML. This tool is very powerful when you need to respect some XML schema compatible with the rest of the world (which is not the case of Flattent/Unflatten to/from XML LV functions ; only LV understandable). -
Hi all ! I mainly use XML files as configuration file for my applications. And then use flatten/unflatten from XML to populate a configuration cluster... I've made a routine which creates the configuration file if it has been deleted by the user. In that case the XML file is create with default values. I usually 'store' these values in the strict type definition of my cluster (see In Strict Typedef png). I was wondering if it was a good idea ? Or should I explicitly bundle the values in my code (like in Init png) ?
-
Hi ! In fact the code is a bit big to be posted here, and as I'm continuing to develop this software program it's getting bigger everyday. So I guess I won't post it. Just to let you know, the problem really looks like this post I found on NI forums : http://forums.ni.com/t5/NI-TestStand/LabVIEW-Access-Violation-Crashes-from-TestStand/td-p/2004661. Except that I don't communicate with devices for the moment and the situation is reversed (I call TS in a LV app ; they call LV modules in TS). NI France was working on my issue, reproduced the bug, but couldn' explain it. So they transfered to NI US support. They, again, reproduced the bug... but it seems that they could'nt find where it comes from. They are still searching... So as soon as I have a decent answer from them I'll let you know...
-
Hi asbo, Sorry for the late reply. Yes you need special access rights : you have to purchase the C-series module MDK... Then NI allow you to access this forum...
- 2 replies
-
- c-series module
- sbrio
-
(and 3 more)
Tagged with:
-
Hi Crelf, I can post my code (somehow ugly because of a lack of time and idrectly using the TS API exemple given with LV...). However, I already tried to trim it down... and it seems to crash just after callbacks are registered. So if the issue comes from a callback code, I'm stuck... Else, it would come from the functions made to deal with users and rights. I tried to debug it using DETT, but every time I launch it LV crashes and nothing appears in DETT (it seems like DETT just stop logging...). Asbo, I just didn't get it when you talked about the object leak dialog. It is turned on on my computer. Of course when LV crashes, the debug window doesn't show up. But when my interface runs well, this dialog window doesn't show up either ! I assume that there is no memory leak... Most of the time, when LV crashes, NIERR window indicates it's an acces violation which made it crash. Sometimes, I see a 'pure virtual function call' Visual C++ error window poping-up... Don't know if that help a lot...
-
Hi all ! Currently building a TS custom interface for one of my customer, I decided (this time) to manage user rights directly using TS user manager. Since I applied this solution, LV randomly crashes (or not crash) without giving any message that could help on resolving the issue. This is not the first time I create TS custom interfaces, but this time there are few new things compared to other HMI I built : newer LV | TS versions than usually (LV 2011 SP1.f2 and TS 2010 SP1.f1) user rights are managed using TS user manager For my user manager, I used a functional global to retain the TS engine reference and share through all functions I made to deal with user (I've built a library in order to reuse these functions later). Maybe this is not allowed... what do you think about it ?
-
Hi, If I understand well, the two subVIs you load in your subpanel run as thread in background. And you control which one to show. When I have to do this, I use User Events. The creation of the user event is done in a FGV. Get and Set actions too, so that I can share the user event reference to any threads I want. So, first create a FGV with Init, Get and Set actions. Then use it wth 'init' action in your initialization VI. Then launch your subVIs 1 & 2. In these subVIs, use the FGV with 'Get' action to register for the events. You then only have to send events in your main VIs using the 'Set' action to share data through your threads. Remember to create one FGV per user event type (ex: one FGV to send data to one specific thread, another to send data to all threads). It works pretty well, and the front panel of your threads (subVIs) do not have to show up.
-
Hi ! I think now (LV2011 for sure) you can explicitly set the "Open FPGA Reference" VI to load a bitfile according to a build specification. Doing this may prevent loading an old bitfile...
-
Here is an interesting topic about adding C-series discovering capabilities to RMC custom boards for SbRIO : http://forums.ni.com/t5/cRIO-Module-Developers-Kit/Can-C-series-module-MDK-can-be-applied-to-SbRIO-mezzanine-card/td-p/1921829 Do not hesitate to post comments on the NI thread or through this forum.
- 2 replies
-
- c-series module
- sbrio
-
(and 3 more)
Tagged with:
-
Hi, I think the best way is to create a daemon program checking at a specific place for a new program version. If a new program is present, maybe you could send an order (TCP based comm for example) to the main app to shut it down... When the update is done, simply relaunch the new app with a terminal command for example...
-
Chose promise, chose due ! Voici une version (non complete) qui permet d'avoir la plupart des strings d'interface en Francais. Si quelqu'un se sent des les completer, qu'il | elle n'hésite pas à les faire partager... Here they are ! All strings are not translated but most of the interface strings are in French... If somebody wants to complete them, then share the update ! Francais.zip
- 1 reply
-
- 1
-
Hi everybody ! Currently developing an application embedding TS interface (ActiveX) in several languages, I'm facing a problem with the TS UI strings : they are only available in English !!! If you want to display your TS interface in other languages, you have to translate INI files that are placed in "C:\Program Files\National Instruments\TestStand 4.2.1\Components\Language\<Language>"... That's a lot of work !! So the idea is, maybe, you guys have already done this work for several languages... Why not sharing it here ? PS: As soon as my French translation is finished, I'll post it here !