Jump to content

How to evaluate data at a time in all the messages?


NickC

Recommended Posts

Posted

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

post-52811-0-20762700-1416413045_thumb.p

NEO VI Example.llb

Posted

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.

  • Like 1
Posted

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.

  • Like 1
Posted

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.

Posted

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?

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.