NickC Posted November 19, 2014 Report Share Posted November 19, 2014 Presently I am able to evaluate one message as show in attached Capture1 image. Now I would like to do evaluate multiple messages like as shown in attached Capture1 image. Do I need to multiple case structure for every message Id or is there any other way to evaluate? Could some one Please help. Attached complete VI NEO VI Example.llb Quote Link to comment
jcarmody Posted November 19, 2014 Report Share Posted November 19, 2014 You don't need multiple Case structures for every message if you'll wire ArbIDOrHeader directly to the Case structure you already have. Just add a new case for every message. Generally, it's silly to compare a value with a constant to decide which case to execute. Just wire directly into the structure. 1 Quote Link to comment
hooovahh Posted November 19, 2014 Report Share Posted November 19, 2014 You don't need multiple Case structures for every message if you'll wire ArbIDOrHeader directly to the Case structure you already have. Just add a new case for every message. Generally, it's silly to compare a value with a constant to decide which case to execute. Just wire directly into the structure. Yup great advice. The only thing I'd add is that the case structure can show a radix when a numeric is wired to it. So you can choose to view it in Hex which I assume would be easier for you. But of course if you have a CAN DBC file and you want to perform the frame to signal conversion without all the hassle of parsing each frame manually, you could look into leveraging the XNet API to perform the conversion for you. https://decibel.ni.com/content/docs/DOC-39793 But if you just want to convert a few manually that's fine too, it won't require the XNet API and probably would be faster because of it. 1 Quote Link to comment
NickC Posted November 21, 2014 Author Report Share Posted November 21, 2014 Thanks a lot Jcarmody and Hooovahh. I have one question, Is there any way to control case structure from the front panel. Here I need perform different types of evaluations on same messages. I do not want to do all at a time. Quote Link to comment
jcarmody Posted November 21, 2014 Report Share Posted November 21, 2014 I have one question, Is there any way to control case structure from the front panel. Well, you could put the Case structure in an Event structure and respond to the Value Changed event of a control wired to the selector terminal of the Case structure. I'm not sure I understand what you've got in mind, though. Are you anticipating receiving many messages and wanting to manually examine some of them? How will you isolate the ones you want to examine? Quote Link to comment
NickC Posted November 21, 2014 Author Report Share Posted November 21, 2014 In my case, I am receiving continuously 100, 101, 102 Msg ids. From this I need to evaluate Case1: Byte0, Byte1 from Msg id 100, bit1 in Byte1 from 101 Msg id Case 2: Byte2, Byte3 from Msg id 100, bit1 in Byte0 from 101 Msg id and Byte6, Byte7 from 102 Msg id Case 3: bit#0 in Byte6 from Msg id 100, Byte2&Byte3 from 101 Msg id and Byte0&1 from 102 msg id. Here I would like to test one case at a time and I need to control from front panel. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.