FAQs

 

Tech Notes

 

 

FAQs - RPvdsEx

When trying to use a ParTag, why do I always get an error message “one or more links connect incompatible ports”?

What are time slices and how should I use them?

How do I check the cycle usage of my circuit?

My cycle usage is too high. How can I decrease it?

Why does my PulseTrain component not work? The output is always zero.


Question: When trying to use a ParTag, why do I always get an error message “one or more links connect incompatible ports”?

Answer: When connecting ParTags, the link should always go from the ParTag component to the other component, and not the other way around. This is true for both left ParTags and right ParTags (they both function exactly the same; the difference is just for looks).

>> Back to Top

Question: What are time slices and how should I use them?

Answer:  Circuit components are executed on the real-time processors on each tick of the sample clock. Time slices allow users to execute a specific component or set of components less frequently than once a sample tick. For example, if the number of time slices is set to 10 and a component, such as a SerStore, runs in time slice 1, (Time Slice = 0 means that it runs in each time slice. Time Slice = -1 means it loads at run time.) data will only be stored to the buffer every tenth tick of the sample clock. If the number was 100 then data would be stored once every 100 ticks. So, one function of a time slices is to reduce the amount data stored to a buffer. If the data rate required is 100 Hz you can use time slices to reduce the number of points to that data rate.

However, you have to be careful using time slices. They should not be used with the DAC inputs, ADC outputs, or filters (you can use them with filter coefficients). In addition, component parameters that take inputs that generate a logical high for a short duration, such as software triggers (TrgIn) may fail to respond to the event. Make sure that the input produces a logical high that equals the number of time slices.

Another function of time slices is to decrease the cycle usage of a system. Components that run in a time slice only use DSP processing power during that time slice. For example, filter coefficients use a large amount of processing power. If several coefficient generators are running at once the cycle usage might exceed 100%. To avoid this you can have each of the coefficient generators running in a separate time slice. This may decrease cycle usage enough that you can run more complex circuits. However, you should always test the circuit to ensure that the cycle usage does not exceed 100% in any time slice.

>> Back to Top

Question: How do I check the cycle usage of my circuit?

Answer:  Use the CycUsage component (in the Device Status category). Link the output of the CycUsage component to a parameter watch and look at the value. If the value is over 100, then the processor cannot handle your circuit, so you will have to use a lower sample rate or do something else to reduce the cycle usage (see below for ideas on how to do this). Also, be careful because the cycle usage can wrap around if it is too far over 100, e.g., if the cycle usage is 124.3, it may only display 24.3. For this reason, you should test the circuit at a lower sample rate and see whether the cycle usage increases or decreases.

>> Back to Top

Question: My cycle usage is too high. How can I decrease it?

Answer:  The easiest way to lower cycle usage is by decreasing the sample rate. When running at high sample rates (particularly 200 kHz), your circuits cannot contain many components without going over 100% cycle usage. If you cannot lower the sample rate, there are some other ways of decreasing the cycle usage. In many cases, timeslices can be used (see section “RPX Time Slices” in the RPvds help file). Also, some components can be replaced with more efficient components. For example, the SerialBuf component uses a lot of cycles because it supports reading and writing – if you are only using it for reading, then replace it with a SerSource component, or if you are only using it for writing, then replace it with a SerStore component. Some other possibilities: if you can, use PulseTrain2 instead of PulseTrain, Schmitt2 instead of Schmitt, SimpCount instead of Counter, and LinGate instead of Cos2Gate. If all else fails, you may be able to split your circuit into two parts that can run on two separate hardware devices.

>> Back to Top

Question: Why does my PulseTrain component not work? The output is always zero.

Answer: By default, the Trg of a PulseTrain component is set to zero, which means that it will not pulse. If you want it to pulse constantly, you can set Trg to one. Otherwise, you will need to hook up another component to use as a trigger for the PulseTrain.

>> Back to Top