Reading the mode channel start and no. of bits using the CAN channel API

Currently I am using the CAN channel API to get information from a CANdb file.  I'm using it to get max, min, scaling information, etc.  However, I can not use it to get the start bit and the number of bits in the channel mode when using mode-dependant channels.  Is there an easier method to retrieve this information using one of the CAN API's instead of manually parsing the file myself for the information?

I think that there has been some misunderstanding with regard to the
original question. I believe Dillon is trying to find the start bit and
number of bits in the multiplexer. The terminology of multiplexer and
mode gets a little confusing. For clarification, my understanding is
that a mode is a specific value of a multiplexer. In the case of Dirk's
example code, he was able to retrieve the number
of bits of the CHANNEL, but not the number of bits of the MULTIPLEXER. 
I believe that I have run into a similar problem to
Dillon's. I want to read a NI CAN Database (*.ncd) or a Vector CAN
Database (*.dbc) programmitically. I have attached a zip containing a
VI and some *.ncd file to allow others to see my progress thus far.
This is a heavily modified version of Dirk's previously posted program.
As you can see, it is easy to get a list of messages using the "CAN Get
Names" VI. Using that list of messages, it is also easy to get a list
of channels by reusing the "CAN Get Names" VI. The list of channels
does not include any information as to whether or not they belong to a
multiplexer, but fortunately we can use the "CAN Get Property" VI to
find out which channels are mode dependent and the value of the mode
that the channel corresponds to (if it is mode dependent).
Unfortunately, this does not give us any information as to the location
or length of the multiplexer which contains the mode. Thus, I know
whether I should be looking for a multiplexer and I know what value to
watch for in the multiplexer, but I have no idea where or how to look
for that value in the CAN message.
Interestingly, by
playing around with Dirk's database that he had attached, I was able to
determine that the list of channels does not always give out the same
information. Typically, you will simply receive an 1D array strings
containing only the channel names, but the output is different in the
event that you have a database that meets the following criteria:
    1. Two channels (in different modes) have the same name
    2. The database contains at least two multiplexers
In
this case the output will be a 1D array of strings in which the
repeated channels (regardless of whether they are in the same
multiplexer) will be output in the format "<message
name>.<multiplexer NAME>.<mode value>.<channel
name>". The channels that have unique names are simply output as the
channel name. Now this is helpful in that by default the multiplexer
name contains the start bit of the multiplexer, but this cannot be
relied upon. The creator of the database could easily change the name
of the multiplexer and the format is only adhered to when the
previously mentioned criteria are met. Also it still does not tell us
anything about the number of bits expected in the multiplexer (remember
Dirk had found the number of bits expected for the CHANNEL).
I have found another alternative output format when the following criteria are met:
    1. Two channels (in different modes) have the same name
    2. Only one multiplexer is contained within the file
In
this case the output will be a 1D array of strings in which the
repeated channels will be output in the format "<message
name>.<mode value>.<channel
name>".  Again, this special format is only used for the repeated
channels. Uniquely named channels are simply output as channel names. While this is not particularly useful, but I thought I should mention it.
It
is also probably worth noting that I found the previously mentioned
alternative formats by directly reading reading a *.ncd file. It
appears that by reading the channels directly from MAX we get at least
one additional format (<message name.channel name> ).  Considering
that this is actually even less information and since my application
specifically requires that I directly read a CAN database without the
assistance of MAX, I have not significantly explored this avenue.
Let
me finish by reiterating the question that I am asking: How do you
programmitically determine the start bit and number of bits of the
multiplexers in a CAN database (*.ncd or *.dbc). I have attached a zip
file containg my current "testing" VI and some databases to illustrate
the results that I have described above.
Message Edited by William Griffin on 01-06-2009 04:58 PM
William Griffin
NI Certified LabVIEW Architect
NI Certified Professional Instructor
DISTek Integration, Inc. - NI Certified Alliance Partner
http://ww2.distek.com
Attachments:
test_mode_dep_msg_rev_B.zip ‏18 KB

Similar Messages

  • How to start and finish a transaction using EJB 3.0 in JDeveloper

    Hello everybody!
    Does anybody can explain how to start and finish a transaction using EJB 3.0. I need to start a transaction insert some information in some tables and if everything was fine commit the information.
    I put the annotation @TransactionManagement(TransactionManagementType.BEAN) in my session bean and @Resource SessionContext ejbContext; but I don't what anything else I have to do.
    Any help will be appreciate.

    I tryied to use in the client the statement EntityTransaction transaction = myBean.getTransact(); but I receive the EJBException: Cannot use resource level transactions with a container managed EntityManager
    I just need to start a transaction something like this: transaction.begin(); and finish the transaction, something like this: transaction.commit();
    Does anybody can help?

  • How to Starting and Stopping OC4J Server using Ant

    How to Starting and Stopping OC4J Server using Ant
    In the ant task definitions for ant-oracle-classes.jar (see antlib.xml) there are two tasks called
         name="restartServer" classname="oracle.ant.taskdefs.deploy.JSR88StartServer"
         name="shutdownServer" classname="oracle.ant.taskdefs.deploy.JSR88ShutdownServer"
    I thought that these would shutdown and start the OC4J server. I guessed the parameters as – (Does anyone know where 50 ant targets are documented?)
    <oracle:restartServer
    userid="${oc4j.admin.user}"
         password="${oc4j.admin.password}"
         deployeruri="${deployer.uri}"
    />
    <oracle:shutdownServer
         userid="${oc4j.admin.user}"
         password="${oc4j.admin.password}"
         deployeruri="${deployer.uri}"
    />
    This, however does not start and stop the SOA suite. To do that I've hacked this solution together -
    <path id="oc4j.console">
         <pathelement location="${oracle.home}/config"/>
         <pathelement location="${oracle.home}/jlib/startupconsole.jar"/>
         <pathelement location="${oracle.home}/opmn/lib/optic.jar"/>
         <pathelement location="${oracle.home}/lib/xmlparserv2.jar"/>
    </path>
    <target name="stop" description="stop oc4j server" depends="init">
         <java classname="oracle.appserver.startupconsole.view.Runner">
              <classpath refid="oc4j.console"/>
              <sysproperty key="ORACLE_HOME" path="${oracle.home}"/>
              <arg value="stop"/>
         </java>
    </target>
    <target name="start" description="restart oc4j server" depends="init">
         <java classname="oracle.appserver.startupconsole.view.Runner">
              <classpath refid="oc4j.console"/>
              <sysproperty key="ORACLE_HOME" path="${oracle.home}"/>
              <arg value="start"/>
         </java>
    </target>
    This sort of works – except when the SOA suite doesn't stop cleanly – and needs user interaction to press a Close button. This isn't very useful when doing a continous integration build and deploy.
    So, does anyone have any suggestions or alternative methods to do this?
    - frank

    Actually if the server throws exceptions when it stops (which it always has since we applied patch 10.1.3.3) this technique will pause until a user responds to pop-up ... So a better way (I think) is -
    <target name="start" description="start oc4j server" depends="init">
    <java classname="oracle.appserver.startupconsole.view.Runner">
    <classpath refid="oc4j.console"/>
    <sysproperty key="ORACLE_HOME" path="${oracle.home}"/>
    <arg value="start"/>
    </java>
    </target>
    <target name="stop" description="stop oc4j server" depends="init">
    <echo message="We expect OC4J *NOT* to stop cleanly, so we will timeout after 3 minutes ..."/>
    <java classname="oracle.appserver.startupconsole.view.Runner" fork="true" timeout="180000">
    <classpath refid="oc4j.console"/>
    <sysproperty key="ORACLE_HOME" path="${oracle.home}"/>
    <arg value="stop"/>
    </java>
    </target>
    <target name="restart" description="restart oc4j server">
    <antcall target="stop"/>
    <!-- wait for server to quieten down -->
    <waitfor maxwait="2" maxwaitunit="minute">
    <not><http url="http://${oc4j.http.hostname}:${oc4j.http.port}"/></not>
    </waitfor>
    <antcall target="start"/>
    </target>

  • Action list not found error when trying to install Flash 11. I have IE8 and windows 32 bit. What can

    action list not found error when trying to install Flash 11. I have IE8 and windows 32 bit. What can I do? Thanks

    Hi, Please try to download the installer from the links provided in the following page: http://helpx.adobe.com/content/help/en/flash-player/kb/installation-problems-flash-player- windows.html#main-pars_header
    Thanks,
    Sunil

  • NI PCI 6225: How to start and stop an acquisition using triggers

    Hi,
    Hi already spent two days reading the previous post on start/stop trigger and end up with just a complet breakdown....
    I'm using a NI PCI 6225 for a project on brain activity.
    I want to start the aquisition of 10 channels at 1Khz on a first trigger (i.e. portline 0) and stop it on a second trigger (i.e. portline 1). The duration of the recording should not exceed 5min.
    Any help will really be apreciated as well as some explanations. I'm not an expert but I do can understand if I'm being explained...slowly. I hope this post will not contribute additionally to the/my confusion on this topic....
    Thanks for your attention and help,
    OD

    Hi,
    Unfortunately, it is not possible to stop the acquisition with a second trigger (just start the task). There are some approaches to what you need, but not exactly the same. Please take a look to the next example.
    http://zone.ni.com/devzone/cda/epd/p/id/5028
    I think the only way to perform what you need will be by software and with all the consideration about timing that you should already know.
    Regards,
    Richard.

  • When I go onto certain websites that require flash, the program either doesn't work or it continues to refresh. I have windows vista, use Firefox 4, and am using Shockwave flash 10.3.181.4. Videos also start and stop.Am I using the correct flash?

    The two websites where I have the most trouble are www.diamondalignment.com, and blogtalkradio when I go to my switchboard. Every time the site refreshes firefox starts all over again, circling backwards then forwards.
    On every site I go to the circle icon goes backwards for some time then finally goes forward. This has really slowed down my computer. Appreciate your help.

    Hi again, LOL, sometimes it is just a small thing like clearing cookies/history that gets overlooked:-)
    You know, can't see the Forrest for the Trees..
    I'm glad it's working as it should for you!! We have enough to do, right? Like dealing with all of the Windows Patch Tuesday Updates, LOL
    Thanks for marking your thread as answered too.
    eidnolb

  • I am having data i want to measure pulse width without using hardware and tell me how to start and stop soft timer using labview

    soft pulse width measurement

    If you are creating a pulse in software somehow, then you can use Pulse Measurements.vi that's on the Analyze>Waveform Measurements palette. This will require that the input is of the waveform data type with signal and timing information. There's several timing functions on the time & Dialog palette that you could probably use. Check out Tick Count and Elapsed Time. If you could provide more details on what exactly you need to do, we could provide more help.

  • How to start AND end a loop using a Boolean Button set to "Switch When Released" operation

    I have a Boolean button set to "Switch When Released" operation. When I press this button (now it's in the On state) I want to run a loop that does something continupously (for now, let's say it displays a simulated sine wave) until I press the button again (now the button is in the Off state) in which case, I want to end the loop. I am wiring my button to the loop condition that's set to "Continue if true" and have a "Wait Until Next ms Multiple" of 200 ms (I tried up to 500 ms). When I run the VI and press the button the first time, I see the sine wave displayed. But when I press the button again, nothing happens. It looks like it does not respond to the user interface. What's happening. What am I doing wrong? I'm using an Event Handler design pattern. I've also tried the Producer/Consumer (Events) design pattern. But I don't imagine the particular design pattern should make a difference. I've attached my code. Thanx.
    Fataneh
    Attachments:
    My_Event_Handler.vi ‏107 KB

    A simple solution would be to harness the timeout event, where you would put your data simulation. No need for parallel loops and local variables.
    The event timeout is starts out as  -1 (infinite) but pressing the start/stop button toggles between a 200ms and an infinite timout whenever it is pressed. Since the evet structure always runs, all other events (e.g. stop) are also serviced.
    Please ask if anything is not clear... Good luck!
    Message Edited by altenbach on 07-13-2005 04:20 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    My_Event_HandlerMOD_CA.vi ‏116 KB

  • Iphoto wont start and deleted all of my photos. can i uninstall and reinstall iPhoto?

    can i uninstall and reinstall my iphoto and will it fix the problem that i have with not being able to import and look at photos?

    Of course you can uninstall and reinstall iPhoto - but it Probably will not help at all
    But that is only a wild guess since no one has any idea what you have or what your problem is
    Lets start with really simple basics - what version of iPhoto do you have? what recently changed or happened that might be related to this? What exactly does "won't start" mean?  Why do you "think" iPhoto deleted all of your photos?
    Do you have a good current backup? Note that iPhoto does not "delete" photos - users can but iPhoto does not
    You sate numourour problems - please describe each and be concise without editorial comments
    1 - iPhoto won't start
    2 - iPhoto delete all of your photos
    3 - iPhoto will not import photos
    4 - iPhoto will not let you look at photos
    LN

  • My itunes no longer recognises my nanos following latest update. I have uninstalled and reinstalled but no use. Can anyone help??

    Following the latest update on itunes - none of my nano devices are recognised anymore which is a bit of an issue. I have worked through all the advice on the online help but still no better off.
    I notice that a few others have had similar problems - does anyone have any advice on how to sort this out?

    Hello Andy,
    I would be concerned too if my iPod was not recognized by iTunes.  I found a couple of articles that might help with this.
    If you don't see your iPod in the My Computer or Computer section of Windows, follow the steps in this article:
    iPod not recognized in 'My Computer' and in iTunes for Windows
    http://support.apple.com/kb/TS1369
    If Windows recognizes your iPod but iTunes does not, follow the steps in this article:
    iPod: Appears in Windows but not in iTunes
    http://support.apple.com/kb/TS1363
    Thank you for posting in the Apple Support Communities.
    Best,
    Sheila M.

  • How to read the data from XML file and insert into oracle DB

    Hi All,
    I have below require ment.
    I will receive data in the XML file. then i need to read that data and insert into oracle tables. please let me know how this can be handled.
    Many Thanks.

    Sounds a lot like this question, only with less details.
    how to read data from XML  variable and insert into table variable
    We can only help if you provide us details to help as we cannot see what you are doing and only know what you tell us.  Plenty of examples abound on the forums that cover the topics you seek as well.

  • How to reset firefox without openning the firefox as after repeated installation it fails to start and gives error message " Your Firefox profile cannot be load

    "Your Firefox profile cannot be loaded. It may be missing or inaccessible."
    I dont know why this message has appeared. i have tried uninstalling and reinstalling firefox after completely deleting all files and folders of mozilla from program files and registry.Despite of that firefox will not start and keep giving error message. i can not reset firefox without openning firefox.Profile does not open in window search.
    On openning app data profile manually there is nothing much i can do as it shows [General]
    StartWithLastProfile=1
    [Profile0]
    Name=default
    IsRelative=1
    Path=Profiles/2tt76737.default
    how shall i fix and restore firefox as i am desperate please , please help....

    Does that Profiles/2tt76737.default still exist?
    Create a new profile as a test to check if your current profile is causing the problems.
    See "Creating a profile":
    *https://support.mozilla.org/kb/profile-manager-create-and-remove-firefox-profiles
    *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Profile_issues
    If the new profile works then you can transfer some files from an existing profile to the new profile, but be careful not to copy corrupted files.
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • HT1947 The curent version is missing visualization start and stop

    The curent version is missing visualization start and stop

    While this may work it can be improved significantly. This really isn't a state machine. This is basically the same as your flat sequence with the exception of using a While loop with a Case statement to implement each frame.
    You should define what your actions are and create a typedefed ENUM naming them. State names of 1 through 24 are meaningless. Not to mention in your code many of the cases are duplicates of others. That would mean that all of those can be one state with logic to determine what action/state comes next. A properly defined state machine would not need the outside For loop. Without knowing your specific needs some examples of reason state names would be the following: Start, Stop, Exit, Error, Initialize, Get Tank Level, Fill Tank, Drain Tank, Idle, etc. Can you see how these are easier to understand than 1 through 24.
    There are lots of examples of state machines here. Try a search and take a look at some of them.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Start and Stop Trigger using PXI-6120 and DigitalSta​rtAndStopT​rigger.vi not working :-(

    Hello,
    I've been trying for a while now to get my PXI unit to capture a waveform between a Start and Stop (Reference) Trigger using the NI example DigitalStartAndStopTrigger.vi downloaded from the NI website. However, whilst the start trigger and stop trigger seem to be working i.e. the VI runs and stops at  the correct times there is never any data read from my DAQmx compatible PXI-6120 card. So I can see the VI is running around the aquisition loop but the Property Node AvailSampPerChan is always returning zero... this has me slightly puzzled. I thought this might just be a driver issue so I've updated my box to the following software versions (see below) and installed the latest drivers e.g. DCDNov07.exe (also from the NI site) but nothing has changed.
    my software as of now.
    Labview 7.1 (with the 7.1.1 upgrade applied)
    Max 4.3.0.49152
    DAQmx 8.6.0f12
    Trad DAQ 7.4.4f7
    before I updated I had the same problem but with the following versions:
    Labview 7.1 (with the 7.1.1 upgrade applied)
    Max 4.2.1.3001
    DAQmx 8.5.0f5
    Trad DAQ 6.9.3f4
    So to cut a long story short I still have the same problem with the triggers... does anybody have any ideas what is going wrong?
    To add insult to injury it the traditional DAQ example ai_start-stop_d-trig.vi was almost working correctly before I did the upgrade. It had the strange behaviour of capturing the AI0 channel but on the wrong edges (e.g. if I set Start on Rise and Stop on Fall it would do the opposite, Start on Fall and Stop on Rise).
    I'm going to leave my box doing a mass compile over night but i'd really like it if someone could suggest a solution or point me in the right direction.
    Many thanks,
    Mike

    Hi Graham
    I'm out of the lab today but I'll try and answer your questions as best I can...
    1) What are the values you have set for Buffer size, Rate, samples per read and post trigger Samples?
    At the moment I have all the values (e.g. sample rate, buffer size etc) unchanged apart from the ones I mentioned in my previous post (see above). I have in the past played around with changing the buffer sizes and rates in the example VI but as this appeared to have no effect on the behaviour I now have them setup as in the download.
    2) Does the program end after the stop trigger is implemented?
    Yep, if I toggle the trigger line high then low I see the program exits the read loop and the VI stops running as expected.
    3) Lastly can you give me the details of triggering method. Are you
    using a digital train of users set digital pulses? how long is the
    program running.I'm using the WriteDigChan.vi to manually toggle the first digital line of the PXI-6733 card which is wired directly to PFI0 of the PXI-6120 card. Generally, I just start the VI running  and then toggle the line high, wait a couple of seconds and then toggle it low.
    To me it all looks like it should be acquiring samples but as I said yesterday it just refuses to fill the buffer with any data (and hence no samples are read).
    Any ideas? and thanks for you help,
    Mike

  • I can only get my bookmarks to appear in safe mode when starting firefox normally they do not appear

    # Question
    i can only get my bookmarks to appear in safe mode when starting firefox normally they do not appear

    Extensions can sometimes be the cause of problems. If the problem does not occur in Safe Mode, then you can disable your extensions one-by-one until you find out which one is causing the problem. See [[Troubleshooting extensions and themes]]

Maybe you are looking for

  • How do I transfer a gift certificate from one country's ITMS to another's?

    I have received a gift certificate for the Canadian ITMS from my sister, but I live in Germany. I can neither log in to the Canadian store, nor use the gift certificate in Germany. How do I transfer it? Thanks, Carsten

  • 2 Vertical Black Bars Across Screen...

    Anyone know about or experienced vertical black bars (2) across the monitor after returning from sleep or standby mode? I'm just worried my computer will crap out on me when it's most inconvenient so I'm trying to guage what computer problems/elderly

  • Cannot update due date in SharePoint 2010 Approvel Workflow generated Task

    Wondering why due date cannot be changed by users with List permissions on a Task which was generated from the built-in Approval workflow. I can have the workflow set the initial due date. The business process dictates that at times the due date need

  • Error code -5002

    Hi , I've tried to update a sale order (ORDR), but it returns the error code "-5002,msg=” Document rows cannot be closed concurrently with the other document modifications you have made[RDR1.LineStatus][:Line:0]” the code is the following:       Dim

  • Find ap checks view accounting

    Hi, I need to find the way to see the accounting of a pay. When I find a pay and go to Tools->View Accounting a new browser window pop ups and show me the information I am looking for. Does anybody know what is the name of the table containing that i