115

Virtual math channels and analog transformation functions


S
Saleae

Example: Logic operations for digital channels (AND, OR, XOR) up to more sophisticated functions

Example: add a scaling factor (y=x*3-1) to convert a presure sensor from the analog voltage to the actual bar (presure) value

Example: Perform math (add/subtract/multipl/divide) on multiple analog channels

You would probably have to make a separate "computed" background with a virtual 2x normal range for the combo ones, because the result might be out of range of the Saleae's actual hardware. So you can still show a software sum, even if your hardware can't read it.

A

Activity Newest / Oldest

J

Jon

Can an extension modify the measured value? This feature is on my "must have" list for sure. I've got, what, 15 or more of these analyzers, and I'm about to roll out new hardware that really could use the ability to scale a voltage measurement to be something else (in my case, current). I hate to have the engineering team having to do the conversion. This is super easy to do in a Digilent AD2 or AD3.


K

Kristian

As an embedded/analog guy, this would just about double the usefulness of the instrument for me in MANY applications. Really would be a step change for the thing, and I'm so disappointed that it has not been prioritized over the last several years.


  • M
  • A
  • P
Avatar

Tim

(#89844)
"Feature Request - Subtraction mode for 2 analog signals. If the difference between 2 analog signals could be plotted in real time then I could monitor differential signals and voltage drops across resistors at high speed. This would allow me to use the Saleae to debug a current modulation scheme."


  • P
R

Raoul

Any update on adding math functions? It's been 4 years since the initial request and I have not seen any updates. Even adding trivial math functions like subtraction would allow one to look at differential signals


  • P
Avatar

Tim

No updates at the moment. However, we're certainly aware this is currently our highest voted feature request! We're heads down on other high priority projects at the moment, some of which we are hoping to officially announce soon.


  • P
P

Peter

Is there any ETA for this feature? I assumed that any decent mixed domain instrument can do math, but I was proved wrong... I need this feature


B

Benno

add or subtract analog signals to a virtual channel.
Then do a threshold on the cannel to get a digital channel
Then you can decode your CAN or any differential protocol on the result.


J

Jędrzej

Hi, any updates on the topic? It's been over 4 years and this functionality would be life-changing.


  • P
Avatar

Tim

We don't have any updates on this yet. We'll update this feature request post in case we do!


K

Kevin

Hello, I would definitely love this feature.
A usage for me would be to perfom an AND operation between two digital channels and to trigger when the virtual channel is high. This would be an error condition in my use case.
I'll stay tuned to this thread to follow the advancement of this feature.
Thanks


  • M
  • P
Avatar

Tim

(#84305)
"Is there an way to set the analog channel ranges with stepped 1-2-5 volts/division and an offset like an oscilloscope?"


Avatar

Tim

(#84135)
"we use the salea logic 8 to capture the analog wave forms. but since we are actually measuring Current we where wondering if and how it is possible to change the value and units. example if we measure over 100mR than 100mV means 100mA but when we measure over 5mR that would mean 2A for our probe. so a plugin taht take Gain and Shunt would be sufficient."


Avatar

Tim

(#84049)
"is there any way to use a math function in saleae? As we’re dividing by ~4, would be great if we could show the actual voltage level in the software."


W

William

Would really love this feature for profiling CPU utilization on a bare bones system. I have IO tracking two critical ISRs as well as task execution and task idle time. Being able to apply logic would make it so easy to determine the utilization.


G

Grzegorz

Hi. any news about logic functions?


  • W
Avatar

Tim

No news on this yet. We'll update this feature request post in case we do.


N

NG

Has this already been implemented?


Avatar

Tim

Unfortunately, we don't have any updates on this feature request yet, nor has this been implemented. Sorry for the inconvenience. Once implemented, we will set the status of this feature request post as Live.


Avatar

Tim

(#82501)
"For software, my idea is to be able to manipulate the values mathematically before putting them onto the graph. For example, if we are logging a signal with an offset and a certain gain, we would like to put this equation: Vgraph = Gain*(Vin-Offset)."


Avatar

Tim

discuss.saleae.com/t/quick-poll-problems-you-try-to-solve-with-an-oscilloscope/995/3
"Capture combinations of signals, like diff A and B channel → see timing difference → see delay/phase shifts."


M

Otzen

Would it make sense to split this request in two?
1. Simple logic channel like AND/OR/XOR of two or more real channels (maybe also very simple analog math) that runs at full sample speed allowing you to use it as a precise trigger source.
2. More advanced math/logic functions to combine two or more channels into one "math" channel, implemented either as a LLA or a HLA. running at what speed such thing do.

ad 1. This require it to be added as core function in Logic.
And would solve the need to i.e. trigger on the delay between two channel going high, and others.

ad 2. This would not require it to be core function, it would require the ability to connect one Analyzer to more inputs, and to output a virtual channel.
While this is slower and might not work as reliable trigger source, you have the full freedom to add whatever math You can imagine, like taking three PWM signal and output one or more analog channel(s) showing the resulting phase voltages on the three phase motor controlled by those PWM's. And a hundred other use cases.


Avatar

Tim

Thanks for writing this in! idea 2 looks related to the existing idea post below:
ideas.saleae.com/b/feature-requests/allow-creation-of-analog-traces-based-off-of-protocol-analyzer-results/


M

Martin

Related in the way that, this is one of the many things that could be done, if idea 2 is implemented. Yes.


Avatar

Tim

ideas.saleae.com/b/feature-requests/analog-transformation-functions/
"Is something like in the attached picture possible? To output the combined signal in a seperate channel?"


B

Brian

Yes please, analog math (differential measurements, e.g.) would be tremendously useful....hmm, originally posted almost three years ago. I guess I shouldn't hold my breath.


A

Adding my vote to this feature.


  • A
Avatar

Tim

(#77191)
"Is it possible to make an addition or substraction of two signals"


Avatar

Tim

(#76365)
"I have another question? Can I use math operations such as Multiply/add to convert my analog signals based on transformations I would like to put on input signals.

Of course, I can do it during post processing but would like to check if it is possible to do the fly.

Another option if newly transformed signal can be used for Digital conversion"


Avatar

Tim

(#75027)
Hello, if I need to analyze a signal on rs485 there is a feature to sum/subtract channels like I would do with MATH function on a oscilloscope? Thanks


A

Aster

I would love this function. Right now I need to export the recordings, import into python and perform the math operations in code before re-plotting, which is very time intensive and not supported by software at all. A way of integrated "virtual" outputs that are mathematical combinations of other channels in Logic seems like a necessity for users, please add it soon!


K

Kevin

This would be so helpful! I was looking into if I could make an analyzer for something like this but I found the analog channels are not available :/


Avatar

Tim

discuss.saleae.com/t/combine-multiple-bits-of-state-machine-digital-signals-and-have-text-on-screen/1684/2
"Could you help me to put text(e.g. IDLE) on the GUI depending on some digital bits as shown in picture in purple color? I am ok with any solution like combining signals and have a single bus
Which tool shall I use to achieve this?

Example: When
state_bit_1 , state_bit_0 = “00” then I would like to have a text “IDLE”
state_bit_1 , state_bit_0 = “01” then I would like to have a text “PREPARE”

image
image
1223×114 6.35 KB
PS:
I am very very new to this tool. I already lost some hours to achieve this. Some help is appreciated."


Avatar

Tim

discuss.saleae.com/t/create-a-wav-with-boolean-of-captured-data/1615
"So, I see on my captured screen the result of the ‘internal equation’ of this PAL16L8
I would like to create automaticly, with extension i think, (below my capture data on screen), a NEW data_line completly created with a Boolean than I enter.

Ex : /DX (virtual) : = (/D0 & /D2)
so… with this ‘new line’, I can see IF the equation that have enter is THE SAME of the original Output (pin 12 on my example)
And of course, on my example, is NOT the same"


Avatar

Tim

Merged with: Math Functions

F

Fabio

It would be very helpful to have the possibility to use basic mathematical functions.
This would allow simplified measurement of differential signals that do not have a common line (e.g. RS-485 measurement without GND line).
The basic operations like adding and subtracting two signals would be great. In addition, it would be very helpful if am this calculated signal could be displayed directly digitally and thus put an analyzer on it.


Avatar

Tim

Merged with: Virtual Channels

M

Martin

I would like to further manipulate analogue and digital data, not just do measurements on them.
Therefore I propose "virtual channels" where captured data is manipulated and the results are shown on a new channel.

This can include simple offset/scaling operations for analogue data, logic operations for digital channels (AND, OR, XOR) up to more sophisticated functions, like signal processing and mixed domain calculations.

Personally I am looking for an implementation of a SINC filter, pulse counter (based on A,B, IDX) and calculating an analogue equivalent voltage based on PWM duty cycle, i.e. average duty cycle every 10µs.
Ideally I can then multiply another channel.

These functions would be extremely helpful for power electronics.


  • Z
J

Johan

This feature request is no.2 on your list but still for more than 2 years it gets no other attention than requests from users to implement it. For some reason however, nothing happens with it - not even a simple strip down that allows to apply user defined scaling. What's the point of having this nice feedback from Tim on requests if they are ignored by the dev team ? :(
If it's technically impossible, then please say so. If doable, implement it.


R

Radek

Ability to convert analog channel to current values by providing resistor value


Avatar

Tim

Merged with: Current measurement

Avatar

Tim

(#67589)
"Is it currently possible to subtract the values between two channels? Effectively, I want to compute the differential between two channels. I did look at the forums and see some questions / ideas in this regard, but wasn't quite sure if it has been implemented and how I would go about making it work - I think I would need the notion of a "virtual" channel that was discussed/proposed in some of the posts. Thank you."
---
"As an example, I had a capacitor in a circuit and neither of its terminals was connected to ground. I wanted to record the voltage across this capacitor. To do so, I hooked up one analog channel to each side of the capacitor (with each recording channel referenced to ground), exported the captured data channels to a csv file, and then used a Python script to read those in and do the math and create graphs. It would be very handy to have this capability built directly into Logic, so that I could easily interact with the computed data just as I would with a natively recorded channel. I don’t mean that the hardware needs to support a differential measurement – it would just be handy if the software could compute the difference between two single-ended channels and write the result to a “virtual channel” (as others have suggested). Of course, arbitrary math (i.e., not just difference) between the channels would be ideal."


Avatar

Tim

(#66498)
"Feature Request - add a scale or gain to analog measurement. ability to convert raw voltage measurements to other units if using sensors"


Avatar

Tim

discuss.saleae.com/t/extension-use-cases-pwm-track-and-digital-comparison-pass-fail-test/1243/3
"I have a series of PWMs that generate an actuation pattern, and I have a signal that represents the timing at which I measure feedback current. I want to essentially unit test this setup to make sure the feedback current is captured at the right time. Simplisticly, some logic could be applied like if CHANNEL A = HI, CHANNEL B = LO, and CHANNEL C = LO…then if a rising edge on CHANNEL D is captured on the feedback signal…this situation is passing. If not, failing. But it could actually be more complicated in that, in that certain combinations have to happen in a certain ordering. All this could be done with digital signals even though we eventually use in a power system. The overall unit test could be made up of a very large buffer that includes iterative test conditions."


Avatar

Tim

(#64171)
"I'm synchronizing two independent devices via radio. To find any temporary asynchronies I have to manually measure time between two matching signal edges at random points in time.
If I could visualize the xor of two clock signals (D4 and D7 in my case) in a new virtual channel, I would be able to immediately identify asynchronies by the width of spikes in the combined signal."


Avatar

Tim

Merged with: Virtual Channel from boolean math on 2 or more physical channels

E

Ethan

Extending the logic behind the trigger to an display as a virtual trace would be a nice feature. For example, TRIGGER = A & (!B & !C).


J

Johan

I think it would be useful to separate the requests to add the features that work on an individual channel from those that involve multiple channels. Granted, both are very desirable, but considering the workload at the Saleae development team, it looks none of this is ever gonna happen. So if we'd limit our expectations to simple but highly usable features (scaling and applying a different unit to an analog channel) the team actually might find a way to realise them along with the stability fixes they're up against.


Avatar

Tim

Noted! We don't mind keeping this idea post intact for now, expecially since we're closely tracking this specific idea post link internally given the number of votes it has collected. Starting with a single channel implementation could certainly be the way we start things off should we decide to officially get this on the roadmap.


E

Ethan

Hey, Tim - If the devel team thinks it's similar enough to merge, I'd be just fine with that.

The reasons I think it's somewhat different are that it's an adaptation of the present capabilities that run at rate. Doing arbitrary floating point math on 50MSa/s is a bit more challenging!


Avatar

Tim

Thanks for clarifying! We're actually having some issues with merging posts at the moment. In the meantime, I'll leave this open as a separate idea post for now.


Avatar

Tim

Thanks for writing this in! This one seems most similar.
ideas.saleae.com/b/feature-requests/analog-transformation-functions/

I'd be happy to merge your idea post into this one, or one of the idea posts you've provided if you prefer. This will help consolidate votes. Let me know which you prefer.


E

Ethan

Hey, Tim - If the devel team thinks it's similar enough to merge, I'd be just fine with that.

The reasons I think it's somewhat different are that it's an adaptation of the present capabilities that run at rate. Doing arbitrary floating point math on 50MSa/s is a bit more challenging!


B

Boris

Display the difference of two channels; DIFF = CH1-CH2 for example (pseudo-differential)


Avatar

Tim

Merged with: Difference channel

Avatar

Tim

(#62706)
"Feature Request - Unit coefficient. For analong measurements it would be great if there were a way to scale the Y axis to a unit by configuring the channel with a lnear constant. For example If a transducer has a output constant of 10 PSI/volt. Then Y axis could read out in PSI for much quicker data visualization. I do this all the time with sensors, and need to use a calculator to do conversions in real-time, and sometimes miscalculate under the pressure. Configure channel would need a field for "unit" (ex. PSI), and constant (ex 10)."


Avatar

Tim

(#61021)
"we are using Saleae Logic Pro 16 with Analog capabilities for doing some measurements.

Currently we have an analog channel connected to the Output Voltage of a Current Sensor. Is there a way to directly display the measured signal as current in Saleae? The formulas to convert the output voltage of the sensor to a current are known. Can this be done via programming an Extension?"


Avatar

Tim

discuss.saleae.com/t/display-difference-between-analog-channels-create-virtual-channel/1032
"Hi,
I know this has been asked before (not only by me;) but now after a log “sw only break” I’m back using Logic 16 PRO, and for the first tests/measurements I really would love to have this feature now
(task: measure current via 2 voltage channels from a 0.1 Ohm shunt, show delta-voltage or directly scale to current and/or power (times voltage).

anything new for 2.3.36++ about comparing/combing data channels without exporting and using external tools (as I like your UI for first data checks & selection;)"


  • J
Avatar

Tim

(#60518)
"Hi, I'm working with Diffrentlial signals (Bipolar). It would be very helpfull if I could create Virtual Analog Channel showing the differance between poles N and P. The math would be f.x. V1 = (A14 - A15)/2"


  • J
Avatar

Tim

(#60247)
"To "see" when one analog value is greater or less than another (like on a scope). Another way to approach this would be to have "waveform math" where a virtural channel could be created that is the difference between two analog channels (i.e. channel 2 minus channel 1), etc."


  • R
R

Rio

Hi Tim, could you let me know how to set the delta between channel in Logic 2?


R

Rio

I misunderstood it's implemented feature. No need to reply to my message.

Voted!


  • Avatar
Avatar

Tim

discuss.saleae.com/t/generate-a-new-channel-based-on-data-from-other-channels/653/8
"Hi, I’m in a similar sittuation.

I have 3 ADCs on the same bus (among other devices). They are accessed by a onboard CS mux, so I don’t have direct access to the CS lines per ADC.

I would like to create a virtual CS channel with f.x. CS = Line1 AND Line2; Then use this virtual CS as input to a SPI analizer"


Avatar

Tim

discuss.saleae.com/t/generate-a-new-channel-based-on-data-from-other-channels/653/11
"Here is my situation: I have good access to the CA0 CA1 CA2 and DEMUX signals. But very difficult access to the nCS lines (requires jumping and soldering fine wires)

Preferably I would like to create virtual nCS signals and use them as CS in the analyzers in Saleaee. This way I could export CSV from each sensor…"


Avatar

Tim

(#58343)
"Having a kind of "SW" channel(s) which draws the result of a
math expression vs time between 2 or more analog channels (or the result of a boolean expression between digital channels) can give us at once the result without the need to export the raw data to an excell sheet."


  • M
L

Lars

Any reasonable mathematical expression should be permitted.
Also involving delays.
E.g. CH3(t) = 2*CH1(t-0.1)+CH2(t)


M

Maciej

Hi, I think this one is the same: saleae.upvoty.com/b/feature-requests/analog-offset/

voting for this and hoping it will soon be implemented.


M

Morten

Combine this with similar capabilities on digital channels using Boolean expressions, and the ability to add a trigger to such a virtual channel, and you have solved no less than five feature requests in one go with a universally useful and powerful feature.

You can even use a digital channel as a switch for a virtual (analog) channel, using a ternary expression:
D1 ? A1 : A2
... or selecting between differential and additive analog values:
D1 ? A1 - A2 : A1 + A2


  • J
H

Harald

I'm looking for "Analog Channel 1" - "Analog Channel 2":
this allows using two channels for a differential/groundfree measurement.

right now I need high resolution electic power consumption in parallel with digital UART/SPI data: using a shunt and measure voltage over that resistor (and scale to amps) ans seeing that "virtual" channel with current values in UI would be *great*


D

David

Other useful math functions would be basic filters - LP, HP, BP, BR/Notch. Also FFT for at least audio frequencies up to 44.1kHz - but if it were ever to be implemented there would be no reason to artificially limit f-max.


N

Neel

Status changed to: Open

L

Lee

The Maths functions built-in will make our life much easier


Avatar

Collin Kidder

Yes, I could use subtraction to be able to create a differential channel view.


Avatar

Max

If add subtraction, then we can get differential channels.
That would be very helpful.


  • Avatar
  • L
S

Saleae

Merged with: Channel Math

R

Robert

Creating a custom math channel or probe would be great. A good reference would be the PicoScope software. Besides just the standard operators they have quite a few build in functions from lookup tables, trig, filters, etc.


M

Mattia

Like the math channels available on an oscilloscope. For example:
A = D0 xor D2 (boolean math for digital channels)
B = const*(A1 - A3) (real math for analog channels)
It would be very usefull in some debug jobs.


  • S
S

Saleae

Status changed to: Under review

A

Please also include the ability to add another input in the equation eq. Power = input1 * input2


  • D
  • L
D

David

A*B for frequency mixing too.


  • M