PISO model, shift register 12bits

Hello,
I want to model a misc digital CI only for simulation in multisim. The functionality is PISO (parallel in/serial out) when TE input is high. 
Until now I made the spice model as bellow, but no working. Pls. help.
Symbol(ANSI) Symbol(DIN)
################## Model ##################
Model ID : RegHT12E
Model manufacturer : Generic
Model template :
a%p [%tP1?%t:d%t;P1
+ %tP2?%t:d%t;P2
+ %tP3?%t:d%t;P3
+ %tP4?%t:d%t;P4
+ %tP5?%t:d%t;P5
+ %tP6?%t:d%t;P6
+ %tP7?%t:d%t;P7
+ %tP8?%t:d%t;P8
+ %tPA?%t:d%t;PA
+ %tPB?%t:d%t;PB
+ %tPC?%t:d%t;PC
+ %tPD?%t:d%t;PD
+ %tTE?%t:d%t;TE
+ %tCLK?%t:d%t;CLK]
+ [%tOUT?%t:d%t;OUT] %m
Model data :
.MODEL RegHT12E d_chip ( behaviour= "
+; HT12E
+/inputs TE CLK PD PC PB PA P8 P7 P6 P5 P4 P3 P2 P1
+/outputs OUT
+/clock CLK + 12 2 1
+;SYNC
+; TE CLKPDCBA87654321 FFFFFFFFFFFF NF NF NF NF NF NF NF NF NF NF NF NF
+ L X XXXXXXXXXXXX XXXXXXXXXXXX PD PC PB PA P8 P7 P6 P5 P4 P3 P2 P1
+ H X XXXXXXXXXXXX XXXXXXXXXXXX L F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10
+;ASYNC
+; TE CLKPDCBA87654321 FFFFFFFFFFFF NF NF NF NF NF NF NF NF NF NF NF NF
+ X X XXXXXXXXXXXX XXXXXXXXXXXX F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11
+/table 1
+; TE CLKPDCBA87654321 FFFFFFFFFFFF OUT
+ X X XXXXXXXXXXXX XXXXXXXXXXXX F11
+/delay 2
+;input output Rise time Fall time
+ TE OUT 280n 300n
+ CLK OUT 280n 300n
+/constraint 27
+; Name Event From Event To Min/Max Time
+ 'PULSE WIDTH' LH CLK HL CLK MIN 25n
+ 'SETUP' HL TE HL CLK MIN 20n
+ 'SETUP' LH P1 HL CLK MIN 30n
+ 'SETUP' LH P2 HL CLK MIN 30n
+ 'SETUP' LH P3 HL CLK MIN 30n
+ 'SETUP' LH P4 HL CLK MIN 30n
+ 'SETUP' LH P5 HL CLK MIN 30n
+ 'SETUP' LH P6 HL CLK MIN 30n
+ 'SETUP' LH P7 HL CLK MIN 30n
+ 'SETUP' LH P8 HL CLK MIN 30n
+ 'SETUP' LH PA HL CLK MIN 30n
+ 'SETUP' LH PB HL CLK MIN 30n
+ 'SETUP' LH PC HL CLK MIN 30n
+ 'SETUP' LH PD HL CLK MIN 30n
+ 'HOLD' HL CLK HL TE MIN 25n
+ 'HOLD' HL CLK LH P1 MIN 25n
+ 'HOLD' HL CLK LH P2 MIN 25n
+ 'HOLD' HL CLK LH P3 MIN 25n
+ 'HOLD' HL CLK LH P4 MIN 25n
+ 'HOLD' HL CLK LH P5 MIN 25n
+ 'HOLD' HL CLK LH P6 MIN 25n
+ 'HOLD' HL CLK LH P7 MIN 25n
+ 'HOLD' HL CLK LH P8 MIN 25n
+ 'HOLD' HL CLK LH PA MIN 25n
+ 'HOLD' HL CLK LH PB MIN 25n
+ 'HOLD' HL CLK LH PC MIN 25n
+ 'HOLD' HL CLK LH PD MIN 25n
+")
.end
################## Package ##################
Footprint:
Footprint not found in Ultiboard Database
Package type :
Package manufacturer: Generic
Pin Count : 15
Pins information :
Logical Physical Section Type ERC Status Pin Swap Group Gate Swap Group
P1 GRP:A D:INPUT:TIL_RCV INCLUDE
P2 GRP:A D:INPUT:TIL_RCV INCLUDE
P3 GRP:A D:INPUT:TIL_RCV INCLUDE
P4 GRP:A D:INPUT:TIL_RCV INCLUDE
P5 GRP:A D:INPUT:TIL_RCV INCLUDE
P6 GRP:A D:INPUT:TIL_RCV INCLUDE
P7 GRP:A D:INPUT:TIL_RCV INCLUDE
P8 GRP:A D:INPUT:TIL_RCV INCLUDE
PA GRP:A D:INPUT:TIL_RCV INCLUDE
PB GRP:A D:INPUT:TIL_RCV INCLUDE
PC GRP:A D:INPUT:TIL_RCV INCLUDE
PD GRP:A D:INPUT:TIL_RCV INCLUDE
TE GRP:A D:INPUT:TIL_RCV INCLUDE
CLK GRP:A D:INPUT:TIL_RCV INCLUDE
OUT GRP:A D:OUTPUT:TIL_DRV INCLUDE

Hello,
   4067, HT12E, HT12D models. Included in archives: chip's docs, simulation models and schematic examples.
Best regards,
Grig
Attachments:
cd4067model.zip ‏1115 KB
Holtek12ENC_DEC.zip ‏1120 KB

Similar Messages

  • Error 1 Configuration VIs while Passing Refnum through Shift Register on Mac

    All,
    I am using LabVIEW 2013 SP1 with Mac OS X (Mavericks). I have a simple shift register VI that initializes a .ini file, reads/writes, and closes. I've done this plenty times on windows with no problem. I wrote a quick VI on Mac and I get Error 1. I can't figure out what the problem is. I am attaching my VI. Can somebody shed light on this issue please?
    Kudos always welcome for helpful posts
    Solved!
    Go to Solution.
    Attachments:
    Config File Utility.vi ‏17 KB

    rolfk wrote:
    Keeping the AE in memory is not enough! The Top Level VI in whose hierarchy the Open Config case is executed needs to stay active (eg. not going idle) for as long as you want the open configuration to stay valid. The underlying object where the configuration information is stored in is a queue and that is a refnum like any other refnum in LabVIEW. And all real refnums in LabVIEW (except optionally the VISA ones) will be closed as soon as the top level VI in whose hierarchy the refnum was created/opened goes idle (stops executing).
    Actually even with VISA, "User Data" is lost when the caller goes idle although, VISA will automatically re-open a session identical to the previous session for that alias. Just "User data" isn't preserved in the session history.  Ditto for DAQmx, last session information is externally stored and retrieved (The lookup is by string- so you can coerce a string to VISA Alias or DAQmx I/O container.) the "Session histoy sticks around as long as the VI is in memory.  A trick I learned with an  init all vi call in a TestStand sequence Pre-UUT loop and a model that unloaded the modules when complete.  (I recall I just opened the VI FP "Hidden" as a work around)
    Most NI-Drivers (NI-DMM, NI-Scope etc...) also have this external since really they all use "VISA" down deep (an oversimplification but a good rule of thumb)
    THE EXCEPTION: Software defined instruments.  These act like file refnums and become invalid when the top level vi goes idle. Its the FPGA refnum that dies the sudden death on the "Legacy" drivers. I have not played with "RFmx" and wouldn't mind learning what happens in there.
    And just too really turn it all on its head, There is an LabVIEW Configuration option to "Automatically Close VISA Sessions."  Check that box and the external VISA storage is tossed under the bus so all those sessions you stored on a USR go invalid as soon as the Top Level goes idle
    Some days that can really bug you
    Jeff

  • Getting Back Values from Shift Register from Other Loop (FPGA)

    Referring to the picture above, both while loops are inside one while loop (not shown in picture). Problem is im trying to execute the numeric control once only and use the value from the second loop after that. I tried many ways and still have no idea how...could someone help? Thanks in advanced
    Solved!
    Go to Solution.

    augustg,
    You might try using a case structure to route the numeric control into that shift register only on the first iteration of the outer while loop and in all other cases route the output of the case second loops shift register back into the first. Kind of hard to put into words, but something like this:
    The case structure to the right that I added has one additional case "Default". In this case the value from the shift register of the outermost while loop is wired straight through. Hope this helps!
    Nick C | Staff LabVIEW Platform Product Support Engineer | National Instruments

  • Is there a way to save state of shift register for initializing next time vi is started?

    Hello all,
    I've a quick question. I have right now....a numeric constant...starts with "1" intially when starting the vi.
    I use this as a shift register on my main while loop....as the counter to use when the user clicks various items on my vi.  This tracks the order the user wants things to happen later.
    It has now occured to me..that the user might not have selected all possible options, before quitting the vi....and might need to restart it...and begin to select other options...needing to keep place form when he left off last.
    Of course, with how I have it set up no...when the vi is started...the counter is reset to "1".  All the objects on the screen, are in the state it was when it was stopped...objects selected prior to quitting are still selected in the proper order...but if the user starts to select anything unselected..rather than starting at the next count..it starts at 1.
    Is there any way, upon quitting..to set the initialization counter to whatever number was last in the shift register..so that when the vi is started again...it will start up where it left off?
    Thank you in advance,
    cayenne

    I want to clarify. I'm assuming you have a config window or something that you open and close, but you don't actually stop the program? However, if this is your main window and you are stoppping the program then restarting, in reality you should have the program actually exit. The user should never have to press the run arrow in an executable to keep it consistent with other windows applications. It's (generally) confusing to an end user if they click the "x" and their program stays open. Then they have to click an arrow to make it start again. 
    CLA, LabVIEW Versions 2010-2013

  • Shift register versus comparison in while loop

    Hello,
    I have a question regarding the "proper" (i.e. cheaper in terms of system ressources, easier to read, etc)  way of testing the first entry in while loop. One way would be by using a shift register another by detecting if the loop iteration is zero (see the exemples attached here).   I am doing some calculations in this loop, typically 300 iterations or so.
    Which way is better ? Are there other (simpler) waysofdoing this ?
    Thanks
    N
    Attachments:
    while_loop1.png ‏54 KB
    while_loop2.png ‏53 KB

    Express vi's are not entirely evil. And the time delay express vi's are harmless. I have found express vi's to be very useful if I'm trying something new. Besides, once you get everything working the way you want it to you can always open the front panel and clean out any extraneous code that might slow things down. Once you have done that it will perform just like you wrote it yourself.
    PaulG.
    "I enjoy talking to you. Your mind appeals to me. It resembles my own mind except that you happen to be insane." -- George Orwell

  • How to program shift register to read only when a new user is detected from user?

    Hi,
    I'm currently developing a program for position control in labview. The program is quite simple, whereby user will input the distance that he wants the table to be in the labview program, and labview will send signal to move a motor that will turn a ball screw to move a table horizontally to the targetted position. The criteria is that the profile of the motor depends on the distance it needs to move, whether a two-phase (acceleration and deceleration) or three-phase (acceleration, constant velocity, deceleration) to reach the target position.
    The problem occurs when the user wants to enter a new position (second input) for the table, as the input by user is position the table needs to be but the input required to determine which profile the motor follows depends on the distance that the table will move to get to the targetted position. Therefore, I would need a function to store the input by user temporarily, and recall it only when a new input from user is detected. By this, I would be able to use the difference of the input (input [n+1] - input[n]) and feed it to determine which profile the motor follows and the input by user can be kept as the position he wants the table to travel to (to compare with encoder).
    I thought of using shift registers to do this, but I am not able to make it to perform the deduction ([n+1] - [n]) only when it detects a new input. When i try using shift register, it travels to the targetted position, and one it reaches it will travel back to the original position. For example, when a user input 90, it means the table needs to move to point 90. As the shift register is initialized to 0, it will move to point 90 (90-0 = 90) but upon reaching 90, the shift register sends a signal of 90 (90-90 = 0) and the table returns to it's initial position.
    Is there any way that I can delay the reading of shift register only when a new input is detected or is there another way for me to achieve what i want?
    I've tried searching the discussion forum and ni website but couldn't find similar problems. Thanks for your help in advance.
    Solved!
    Go to Solution.

    Hi,
    I've managed to get what I needed by using a shift register + event structure as suggested by Adnan. However, I face another problem after implementing SR+event. I've attached two files, first the original program and second the updated program using SR + event. (it's only the jpg file as I've forgotten to save the labview program, will upload the program by tomorrow.
    In the original program, I have an elapsed time that is able to run continuously when I run the program. In the updated program, my elapsed time don't seem to run continuously when I run the program (as shown by elapsed time indicator). I need the elapsed time to run continuously as a input to calculate my motor profile.
    I suppose this is caused by the introduction of the event structure, will adding a case structure to wrap the event structure solve the problem or is there another way to get pass this. Appreciate if someone could drop me a pointer or two.
    Thanks
    Attachments:
    Mar 16 - continuous elapsed time.png ‏12 KB
    Mar 16 - elapsed time not continuous after introducing shift register + event structure.png ‏17 KB

  • Using a shift register to detect input...

    Hi guys,
    I'm creating a LabVIEW VI that needs to be able to detect when a user changes an input. I read a previous post that suggested using clusters and shift registers to compare previous data.
    My question is how do I use shift registers? I've created a shift register on a for loop, but I'm not sure when to compare the "previous" data to the "new" data. Do I need to add an element to the left side and compare it there? Is the right side the output? I'm just not sure how it works. An uploaded example would be nice. Thanks.
    -Mike

    Shift registers are very powerful but difficult to use for the first time.
    The shift register you just created has two "arrows", one on either side of the structure. The arrow to the left is the value from the previous (i:th) iteration and the arrow to the right you have to feed with the (i+1)th value.
    Now, if you want to compare values and look for a change you can compare your old value (the one coming out from the left) with the new value in your for loop. The feed your new value to the right arrow so that it becomes the old value for the next iteration.
    If you have many parameters to compare, clusters are very useful since they make things very compact. If you are comparing clusters, do not forget to change the setting on the comparison to compare aggregates (r
    ight click on it and select that option).
    Also, in most cases you need to set the initial (start) value for your shift register. This is done by feeding the left arrow with the default value from the outside of your loop.
    I attached a simple example, CompareSettings.vi, that shows how it works. Hope this helps. /Mikael"
    Attachments:
    comparesettings.vi ‏32 KB

  • How do i read the Shift register value of a vi which is written in the teststand sequence from labview exe

    Dear All..
    My Qusetion is ... I have a VI in which I can writ the data to shift register and I can read( Differenent cases). I am Running the VI in write mode to write SAY '100' in the shiftreg( VI will be In teststand Sequence) . And I am reading the VI in read mode using Labview. I am getting the data in labview.
    When i conver my Reading Vi which is having that Read/Write vi in to EXE even then the test stand is writing the data to VI is Unable to reflect in labview.
    Please Help me out with some solution.
    Thanks
    bhargav

    I'm confused by your question:
    Are you trying to transfer data from an Exe to TestStand and vice versa?
    Or are you changing existing, working VIs into EXEs and then wondering why they won't behave the same?
    Can you clarify some what your goal is?
    There may be a better way to do what you want.
    Thanks,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • Why won't my shift register work?!

    I am trying to calculate the volume by multiplying the rate by the time plus the previous volume. The previous volume is the part that I can't figure out. I used a shift register and it's not working.
    Attachments:
    screen shot of program test 12.gif ‏13 KB

    The first thing I notice is that the loop will never exit since the "Loop Done" is never being written to inside the loop.  I'm not seeing what the point of the while loop is.  Are you trying to wait so long until a certain volume is reached and then report it?
    From a general programming view, you should breakup your code into subVIs.  It'll make it a lot simpler to understand.
    I'm also noticing several "multiply by 1" in there.  Those do nothing, get rid of them.
    I also don't see the point in having separate code for the positive and negative flow rates.  The math works the same (V1 = V0 + rate).  The negative will subtract on its own.
    I would convert to a single flow rate.  For instance, if the rate is in ml/h, convert to ml/min inside a case structure and then do the volume calculation after the case structure.  If the rate is in ml/min, just pass the flow rate through the case structure and do the calculation.  This will eliminate duplicate code.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Any way to save data in loop without using shift register or feedback loop

    Hello all
    I was thinking, is it possible to save data in a loop to next iteration without the use of a shift register or a feedback loop?
    I need the possibility to reload data within a loop from a lvm file, but I want to use the same data until i load some new ones.
    The reason why I don't want to use the shift register or feedback node is due to speed, even though I am not sure if the shift register
    actually moves all the data from one register to another, or if it is stationary until a change in the data occur.
    The data I want to reuse is medium-large (6 force measurements, 2 pressure, 1 flow channels)of about 10sec data in each file with samplingsrate of 2kHz..
    In my analysis program I have many CPU demanding calculations and 3D graphs, so I just want to minimize the CPU load as much as I can for each part of the
    software..
    I have attached a small VI to explain what I am talking about.
    I now I shouldn't use the express VI, and I am going to change that as well - this is just a proof of concept! 
    Hope you guys can help me understand this shift register better...
    Thanks!
    - Tommy 
    Running LabVIEW 2009 32bit SP1 on Windows 7 64Bit
    Solved!
    Go to Solution.
    Attachments:
    visual.vi ‏34 KB

    tombech wrote:
    [...]The reason why I don't want to use the shift register or feedback node is due to speed[...]
     Tommy,
    shift register are the fastest you can ever get...........
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • How to use shift register in this structure?

    Dear All,
    In order to use less variety of graph, I want to use shift register to manage and send data to graph.
    But there is not only event structure in my vi, for some reason(because I want to use only one button to control running and stop, and this must do through variety of button, I can't put this loop into the event structure) I must use other while loops, I don't know how to use shift register in this structure.
    Please tell me anything helpful.
    Thank you!
    Attachments:
    shift register.vi ‏26 KB

    hi there
    there are a lot of solutions. my favorite one is the usage of a so called "FGV" (functional global variable). this allows you to strore, manipulate and transport data through your app with a minimum of wires. see attachment.. (other users may have other favorite solutions...)
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"
    Attachments:
    Shift Register 7.1.zip ‏20 KB

  • Shift Register and waiting time functions - DAQmx

    Thanks that worked. 

    Bob_Schor wrote:
    Mike -- is there a reason to not use Shift Registers here?  It seems to me that (as I explained in my response) it "preserves"  the logic of folding multiple sequential function calls into a loop (you are correct, of course, that you don't need to pass the Task and Error from one function to the next, but that makes logical sense).  It might (or might not -- I haven't checked) be a tad faster or slower (actually, it is almost certainly faster or slower!) one way or the other, but we are probably talking nanoseconds, which pales beside "logical" (a.k.a. "good") Programming Style.
    For a While loop, there should not be real difference.  It might be slightly more memory efficient.  But if you go to a FOR loop, it is a HUGE deal, especially if you are autoindexing on a loop.  Try running a FOR loop 0 times.  If you used tunnels, the default value comes out of the tunnel (in other words, you will lose your reference).  A shift register will pass out the value you initialized the shift register to.
    So it is a good habit to just use the shift registers to avoid that nasty bug.

  • Problem in using the shift Register

    I have a problem regarding shift register when i was using it in my application.
    During the runing of the application i found that sometime shift register not pass the value to the case structure. at that time result is not displayed.
    i have attached the application in which that problem occur and the process regarding the execution, how bug produce and how to check where the shift register stop. please find the attachment and reply on the same.
    Attachments:
    Shift Register Checking Application.zip ‏173 KB

    I'm sorry but I don't understand your program.  I only see one shift register in Result Display.vi.
    What I do see is a lot of odd constuctions of while loops that only run once in your Main.VI.  Also, a heavy reliance on global and local variables that I suspect are leading to race conditions.
    Have you tried using the debugging tools such as probes and highlight execution to see our your application is behaving?
    I'd also be concerned about how you have "Lock Front Panel Until Event Completes" in the cases of your event structure.  And those event call other subVI's that may take a while to run and rely on user interaction with the front panel.  I also don't understand why when I hit "OK", the subVI front panel remains open.  It just makes running your application that much more confusing.

  • Shift Register while Indexing Arrays in Formula Node

    Hello, 
    I am having trouble using the formula node while indexing my two arrays.  I keep getting "NaN" for my output array. I believe the problem lies within my shift register.  My guess is that for the first calculation there is not a PreviousAngle so that is why it is giving me "NaN."  For the first index I would like the value of the PreviousAngle to be 0. I am new to LabView and unsure what to do.
    Thanks!
    Christian Seymour
    Solved!
    Go to Solution.
    Attachments:
    Complementary Filter.vi ‏21 KB

    The shift register should contain 0 by default since you are using a double [if uninitalized, the shfit register takes the default value of the data type.  In this case, the default Double is 0], but you should explicitly initalize the shift register to a default value in most cases.
    To do so, right click on the "previous angle" shift register and select "Create constant".  This will create a Double value of 0 to fill in the register for the first calculation.
    If you need a number other than 0 to start, you can just change this constant.
    **Note:  This is a good habit to have.  Shift registers retain value as long as the VI is in memory.  So if you run this more than once, it will have the value from the last execution automatically!  This is usually unintended behavior for new LabVIEW users -- however you can sometimes take advantage of this feature in some applications and make it intended behavior
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    If someone helped you out, please select their post as the solution and/or give them Kudos!

  • Adding Shift Register to Stacked Case structure

    According the the Help, you can add Shift Registers to Structures.  The Stacked Sequence is a Structure, but I don't see the option to add a Shift Register when I right click on the left side of the Structure.  Am I missing something?  I want to run my Error In and Error Out lines through the Shift Registers in a Stacked Sequence so as not to have to do it using a Feedback Loop, as that would get messy.
    Solved!
    Go to Solution.

    Newenglandguy_LV wrote:
    NIquist wrote:
    I think what you want is the "Add Sequence Local" function which allows you to pass data from one frame to the next.  It's an ugly, confusing choice when you have much better options though. 
    It sounds to me like you just need to create some subVIs to better compartmentalize your code.
    I do understand your comment about compartmentalizing, but if I did that I'd have a VI for every few event sequences.  The only reason I'm putting them in a stacked sequence, is to allow whom every might want to understand the flow, not to have scroll across.  If I was working in a coding language, this would be a simple series of commands, in maybe 10 lines of code.  But that's where I'm struggling to see some of the advantages of LV.  I simply want to have errors flow forward, and send a series of commands to the same instrument with some delay in some cases.
    Perhaps it would be easier to help you understand if you posted the code you have so far. Are you using the sequence frame because you are using the Wait function, which has no error in/out terminals? If so, you can easily whip up a wrapper VI for that function.

Maybe you are looking for

  • Unable To Communicate With Printer HP Officejet Pro 8600 (Network)

    I recently purchased an HP Officejet Pro 8600. One morning a couple weeks ago I tried to print something and I received a prompt saying "Unable to Communicate with Printer (Network)". I turned off the printer and turned it back on which did not help,

  • Install the ADF Runtime Libraries 11gR2 in WebLogic Server 10.3.5

    When we are trying to Install the ADF Runtime Libraries 11gR2 in WebLogic Server 10.3.5 using opatch we are getting following error. PrereqAPI::checkStandAloneHome()) OPatch checks if the patch is applicable on this home product type ApplySession fai

  • XI: file to Idoc

    Hi all, I am getting source data like: Order     order_no    1-1     name         1-1     Item1      0- Unbounded         f1         0-1         f2           0-1 the Requirement is for each item i need to generate new Idoc on target side....is it pos

  • When I move my mac the screen flicker and must be rebooted

    when I move my mac the screen flickers and goes blank then must be rebooted. Crap

  • MacMail keeps crashing!

    Running OSX Lion, just upgraded about a month ago.  Just yesterday, MacMail is crashing on a continuous basis, 9 times already today.  I have not installed anything recently and have done nothing different than I normally do...  Here's the crash repo