Best practice question (migrate from ni to nx)
Raphayo
Posts: 111
Hi,
I'm currently updating an ni system to a nx-4200. I have 2 questions regarding code structure.
I presume the ni program was originally an accent because a lot of work were done in define program ( feedback, serial parsing) and no define_function only define_call.
1). I'm creating ? timeline_event to provide feedback. It is better to use everything in the timeline_event with a timeline. S?quence or create a function feedback() and recall it inside the timeline. Prior i was using my feedback() in define_program but with the nx serie is no more recommand?s to use
2) do i still using define_call or replace them with define_fonction.
Thanks for your input.
I'm currently updating an ni system to a nx-4200. I have 2 questions regarding code structure.
I presume the ni program was originally an accent because a lot of work were done in define program ( feedback, serial parsing) and no define_function only define_call.
1). I'm creating ? timeline_event to provide feedback. It is better to use everything in the timeline_event with a timeline. S?quence or create a function feedback() and recall it inside the timeline. Prior i was using my feedback() in define_program but with the nx serie is no more recommand?s to use
2) do i still using define_call or replace them with define_fonction.
Thanks for your input.
0
Comments
I actually don't use define_call myself as it's left over from olden days of yore... But I think it still works just fine in the NX series procs.
You also might want to take a look at the modules being used. There may be newer ones.
For the TP Feedback, it will be better to have a timeline_event for everyTP who will be activate if the tp goes online.
GregG approach for timeline is very easy to read, button_event follow by timeline_event.
Nope, they work the same. Here's a little test program to illustrate.
and the result
the function
Here again, netlinx is not multi-thread.
so what I do I update my buttons in these events, which will make the button state changes only when the device send a notification about that, which make very sense, why should I keep updating the touch panel every one second, personally I treat this as overload on the master and network
I hope that this could help
I love the organization of doing it that way. Is there any real-world drawback to having it spread out everywhere like that?
However, I also don't do very much feedback in timelines of any sort, due to the performance effects of constantly updating feedback for things that have not changed.