Wierd events issue that cost me about 5 hours...............
Duncan Ellis
Posts: 162
Was on site the other day and did an initial compilation, downloaded my code and when the master rebooted there were no virtual devices showing in the online tree. Also device zero was not evident, but the program was running and you could see some notifications...well, bizarre.
Couldn't sort this out so I thought I would start from scratch and copied the main parts of the program into a new file. When I downloaded this everything worked... again very bizarre. However, as I started to add all the other bits of the program in, the fault re-ocurred. I managed to tie this down to a section that had been added 'out of the normal order'. Whilst it SHOULDN'T matter, I had dropped a CHANNEL_EVENT in between two DATA_EVENTS and this was causing the problem. When I moved it to the end of the events section, everything worked again.
Now, I've been programming for a few years and would like to think that I'm not thick - when it comes to coding. But this is CRAP!
If events need to be in a particular order, then there should be a split section for particular events. Normally, this would never have occurred in my coding as I tend to group event types and I suspect that this has been 'broken' in one of the Studio upgrades. Being honest, tech support wanted me to send various versions to them to verify that the problem existed but I was tight for time and, quite frankly, if they can't be arsed to put this fault on X Track without 'cast iron' proof - considering the time I've been doing this - then I couldn't be bothered to send it to them.
Bad attitude maybe, but the lack of interest recently in fixing issues is driving me a bit nuts. As an independent programmer, I seem to spend my life doing 'work arounds' for stuff that doesn't work and no one seems really that interested - so I've come to the conclusion that this will work both ways.
So, just in case anyone comes across this problem - the solution is above.....
Just to add to the problem list, I recently come across a Master that would not maintain its system number. IP address and everything else was fine, but kept resetting its system number to 1 and therefore generated errors due to the fact that there was two system 1's. The only way I could get around this was to change my code and make the one that kept resetting to system 1 into system 1. Again, no one could give me a solution or an answer. The only difference between this master and the rest was that it was connected to a card frame via ICSHub..what difference that should make..lord only knows
Apologies if you think this is a bit harsh!
stepping off my soap box and going to bed........
hope this saves somebody else a bit of time...
Couldn't sort this out so I thought I would start from scratch and copied the main parts of the program into a new file. When I downloaded this everything worked... again very bizarre. However, as I started to add all the other bits of the program in, the fault re-ocurred. I managed to tie this down to a section that had been added 'out of the normal order'. Whilst it SHOULDN'T matter, I had dropped a CHANNEL_EVENT in between two DATA_EVENTS and this was causing the problem. When I moved it to the end of the events section, everything worked again.
Now, I've been programming for a few years and would like to think that I'm not thick - when it comes to coding. But this is CRAP!
If events need to be in a particular order, then there should be a split section for particular events. Normally, this would never have occurred in my coding as I tend to group event types and I suspect that this has been 'broken' in one of the Studio upgrades. Being honest, tech support wanted me to send various versions to them to verify that the problem existed but I was tight for time and, quite frankly, if they can't be arsed to put this fault on X Track without 'cast iron' proof - considering the time I've been doing this - then I couldn't be bothered to send it to them.
Bad attitude maybe, but the lack of interest recently in fixing issues is driving me a bit nuts. As an independent programmer, I seem to spend my life doing 'work arounds' for stuff that doesn't work and no one seems really that interested - so I've come to the conclusion that this will work both ways.
So, just in case anyone comes across this problem - the solution is above.....
Just to add to the problem list, I recently come across a Master that would not maintain its system number. IP address and everything else was fine, but kept resetting its system number to 1 and therefore generated errors due to the fact that there was two system 1's. The only way I could get around this was to change my code and make the one that kept resetting to system 1 into system 1. Again, no one could give me a solution or an answer. The only difference between this master and the rest was that it was connected to a card frame via ICSHub..what difference that should make..lord only knows
Apologies if you think this is a bit harsh!
stepping off my soap box and going to bed........
hope this saves somebody else a bit of time...
0
Comments
Do you have a copy of the code? I just tried it here on an NI-900 and putting a channel_event in between two data_events did not adversely affect the processor.
Jeff
Paul
It didn't loose it's IP address or program, so nothing wrong with the memory.
This sounds like what occurs when there's a mismatch between the Duet runtimes on the development machine and the firmware version on the master if the vdevs that you're referring to were Duet devs. Did you do a firmware update at any point after noticing the problem?
It will happen with non-Duet systems as well if something eats up too much memory in the startup routines, or too much processor time. I wish I could be more precise; I tend to revert to a sort of shotgun mode when I run across such issues, and shoot first, then ask questions later. Suffice it to say, I have seen code problems cause virtuals never to come online, and resolving them resolved the rest.