LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview or C

hi all

 

my question is regarding , in which direction i should start my programing ..... i have to do is get data from serial (which is easy in labview) after getting that i need to do many condition based decisions ... e.g. the data from serial is 20 byte and i have to base my programming on if the first byte is 1 do this , if the 2nd is 0 and the first is 1 do this if its 0 do this ... u get the point rite?.. meaning all the decisions are inter linked to the data coming from the serial port.. 

 

 

now my question is that ... i know in labview making desicion based is easy but when the programming gets complex the blk diagram becomes complex and complex ..where as in C the code can be written and then imported to labview ..

 

so which is the better option ?

Regards
0 Kudos
Message 1 of 4
(2,890 Views)

If your LabVIEW coding is complex, then won't your C program be complex as well? Sounds to me that a basic state machine in LabVIEW can be used.

 

Choose the language that you are most competent with.

Message 2 of 4
(2,879 Views)

I agree with Dennis. The complexity of a solution to a problem does not depend on the programming language.

 

If you decide to use LabVIEW, we can easily help you. The code might be simpler than you initially thought!

 

Remember, something that looks complex is probably 50% imaginary (pun!). 😄

Message 3 of 4
(2,871 Views)

 Independent of which language you choose to implement the code, you should model the logic before. Using state machines in LV would ask for a 'bubble and arrow' diagram (this is the most simple way of modelling a state machine), but you can go further using uml state diagrams for a better distinction between descision logic (the diamond symbols) and the code (states).

Other modells might be a tabel (like a boolean decision table) or a tree structure. A desicision table is easy to copy into the code as a lookup table, a decision tree might ask for recursion, 'pointers' (just indexing an array, not the pointers you have in C) or an by-ref OOP implementation.

 

If you can present the model here, we will point you to possible ways to implement it in LV.

 

Felix

Message 4 of 4
(2,845 Views)