09-20-2007 11:06 AM - last edited on 01-03-2017 02:20 PM by Christian_L
11-05-2007 11:09 AM
11-08-2007 02:09 PM
07-04-2008 07:30 AM
Hi All,
Let me start by saying that I love the idea of the CVT and it is just the sort of structure I was going to code myself before starting on a compact fieldpoint project. It really looked really good and I jumped into its use with both feet. Here's what I found. Not sure if anyone is going to read this as it seems to be a pretty quiet thread but what the heck...
1. I am using lv 8.5 and I found that the tag editor executable actually did not save the tags correctly. I tested this on both windows and on the cfp and in both cased when the tag file was read back, it was actually corrupted. This was only really clear when you looked at the data structure carefully. Not all fields were corrupted but the label field which I was using for storing the address of IO points on the cfp backplane was corrupted. I ended up having to write my own editor.
2. The biggest problem I have had is that the CVT read and write of doubles which looks perfectly sound, does not work when built into an executable. It works fine when run from the host but when put into an exe, it does not work. I have provided code to NI here in Australia and demonstrated the problem and they are trying to get a resolution. It has been 1.5 weeks and its not looking promising. Meanwhile my whole application which works beautifully when run from the development machine on the CFP does not work when built into an exe. If I am forced to take out the CVT, it will be VERY painful. I am sure it will build character.
3. An interesting thing happened when I went to NI to demonstrate the problem on their hardware. With an old CFP2000 controller, a really simple app using the CVT completely filled up the memory to the point that the app could not run.
My conclusion at present is sadly that
1. The CVT is a great idea, looks well written and is an elegant solution.
2. At present there are bugs which may have more to do with the compilation of the exe for real time than with the actual CVT component. I am using it with no problems on a windows project but avoid it if you are targetting real time.
Oh, I forgot to mention my favourite part of the bug with real time exe and the CVT. If the exe is built with debugging enabled and you connect to it via remote front panel, you will see that the doubles in the CVT dont fnxn (the booleans do). If you then try and perform online debugging, labview downloads a swag of vis to the target to allow the host to see the target in debug mode and then walah! the CVTs function perfectly. If you then exit the debug session and reconnect via a remote front panel, the system continues to look to be working perfectly until you cycle power when of course the system boots up with the freaky exe again.
I love labview but I got to say that everytime I build a real time exe, I feel like I'm about to walk the plank... maybe its just me.
have a good weekend all,
Peter
07-09-2008 11:57 AM
Peter,
Thank you for your detailed feedback. I'd like to help you out with some of the problems you are facing with building the CVT into an executable. Please send me a message at systemseng at ni dot com with your example code.
1. I am using lv 8.5 and I found that the tag editor executable actually did not save the tags correctly. I tested this on both windows and on the cfp and in both cased when the tag file was read back, it was actually corrupted. This was only really clear when you looked at the data structure carefully. Not all fields were corrupted but the label field which I was using for storing the address of IO points on the cfp backplane was corrupted. I ended up having to write my own editor.
07-10-2008 05:44 PM
Gryphon wrote:
2. The biggest problem I have had is that the CVT read and write of doubles which looks perfectly sound, does not work when built into an executable. It works fine when run from the host but when put into an exe, it does not work. I have provided code to NI here in Australia and demonstrated the problem and they are trying to get a resolution. It has been 1.5 weeks and its not looking promising. Meanwhile my whole application which works beautifully when run from the development machine on the CFP does not work when built into an exe. If I am forced to take out the CVT, it will be VERY painful. I am sure it will build character.
07-11-2008 05:37 AM
Christian!!
Man, you are a star. Thanks very much for your support with this problem. I received the modified subvi you sent to support here in australia and support in Australia tested the fix on their hardware and it works. Woohoo!!
I must say that I did not initially suspect the CVT because it is written in straight labview code and there is nothing mysterious in the implementation but everyone I spoke to at NI said it must be the CVT and I guess I got sucked in a little. Apologies for casting aspersions on a great little piece of work.
I attached my code in the zip file and your modifications to the read input vi so others can see the way I implemented stuff and how you fixed it up as well. Comments are more than welcome. I am really glad that your fix worked as it means I can at least move forward.
Now that I have gushed, I do have a few questions.
1. The use of property nodes. I found that with cRIO that it was absolutely suicidal to try and use property nodes and as such stayed away from them in the compact field point as well. Unfortunately the problem I had 1st manifested itself as a chart not updating with any value other than 0. Support over here told me that I should be using property nodes because on RT targets, local variables would modify values on the block diagram and property nodes had to be written to for the front panel to be updated as well. I was shown a very convincing knowledge base artilce that stated this. I can't find it at the moment but I will post a link as soon as I can find it. The other reason that I felt safe in using property nodes is because the implementation of the data logger on compact field point (anothe excellent piece of NI example code which I really like) has quite a bit of it in use. This project is found at
http://zone.ni.com/devzone/cda/epd/p/id/3221
It has property nodes used and builds into a real time executable and appears to work just fine.
2. The way that I was experiencing failures was that only values from analog cards could not be read and written to using the CVT. It worked perfectly when communicating with digital input and output cards. Falling through to defaul cases would not have explained this either. What do you think could have caused this? Also, while you removed the use of a property node in the read inputs sub vi, the updating of the chart was being done by passing a sub vi a reference to a chart which then updated the value of the chart using a property node. That still works fine as well.
3. I have to ask. How did you debug the problem? When I tried debugging my exe, it was meaningless because everything started working perfectly when I tried to connect to it and labview did its download of support vis to the target. Also lots of property nodes (as described above) were working fine and this made me think that the use of property nodes may have been more acceptable of cfp compared to crio.
4. One of the cooles things about all the real time targets is the ability to serve remote front panels over web browsers. If you had an application (as I do) with more than a 100 I/O points which you need to display on the front panel over sets of tabs (like is done with the data logger example) how would you go about writing to the display elements. The vi would take up a heck of a lot of real estate if updates of the front panel was not being done in sub vis. Have I completely missed out some way of doing this without references and property nodes from these references? What is your recomendation.
I think I'll leave it here for now but I am really keen to understand how to use this stuff well and any insights you can provide into the design intent would be greatly appreciated.
Once again thanks for your help and for going over my code. If anyone has questions about the code, please post here and I'll do my best to explain what I was trying to do. Feel free to laugh out loud at my code.
cheers
Peter
07-11-2008 10:17 AM
Gryphon wrote:
1. The use of property nodes. I found that with cRIO that it was absolutely suicidal to try and use property nodes and as such stayed away from them in the compact field point as well. Unfortunately the problem I had 1st manifested itself as a chart not updating with any value other than 0. Support over here told me that I should be using property nodes because on RT targets, local variables would modify values on the block diagram and property nodes had to be written to for the front panel to be updated as well. I was shown a very convincing knowledge base artilce that stated this. I can't find it at the moment but I will post a link as soon as I can find it. The other reason that I felt safe in using property nodes is because the implementation of the data logger on compact field point (anothe excellent piece of NI example code which I really like) has quite a bit of it in use. This project is found at
http://zone.ni.com/devzone/cda/epd/p/id/3221
It has property nodes used and builds into a real time executable and appears to work just fine.
07-11-2008 10:58 AM - edited 07-11-2008 11:01 AM
Gryphon wrote:
2. The way that I was experiencing failures was that only values from analog cards could not be read and written to using the CVT. It worked perfectly when communicating with digital input and output cards. Falling through to defaul cases would not have explained this either. What do you think could have caused this? Also, while you removed the use of a property node in the read inputs sub vi, the updating of the chart was being done by passing a sub vi a reference to a chart which then updated the value of the chart using a property node. That still works fine as well.
3. I have to ask. How did you debug the problem? When I tried debugging my exe, it was meaningless because everything started working perfectly when I tried to connect to it and labview did its download of support vis to the target. Also lots of property nodes (as described above) were working fine and this made me think that the use of property nodes may have been more acceptable of cfp compared to crio.
07-11-2008 11:35 AM
I forgot to mention in my previous post, from a LV RT perspective cRIO (9002/9004) and cFP are virtually identical. Except for the I/O the controllers are very similar and how the SW behaves will be very similar. The newer cRIO controllers (9012/9014/9072/9074) use a different RTOS underneath so there may be slightly more differences, but if you are programming in pure G most things will still be the same. Some DLL/shared library dependent drivers/functions/toolkits may behave differently.
Gryphon wrote:
3. I have to ask. How did you debug the problem? When I tried debugging my exe, it was meaningless because everything started working perfectly when I tried to connect to it and labview did its download of support vis to the target. Also lots of property nodes (as described above) were working fine and this made me think that the use of property nodes may have been more acceptable of cfp compared to crio.
4. One of the cooles things about all the real time targets is the ability to serve remote front panels over web browsers. If you had an application (as I do) with more than a 100 I/O points which you need to display on the front panel over sets of tabs (like is done with the data logger example) how would you go about writing to the display elements. The vi would take up a heck of a lot of real estate if updates of the front panel was not being done in sub vis. Have I completely missed out some way of doing this without references and property nodes from these references? What is your recomendation.