Jump to content

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


NickC

Recommended Posts

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
Link to comment

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
Link to comment

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?

Link to comment

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.

Link to comment

Join the conversation

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

Guest
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.