Initial value of a flip flop on logisim - flip-flop

I am implementing flipflops in logisim. Usually, their output gets back to the circuit as their own inputs. This only works if I manually insert an initial value to the flipflop and then reconnect its output to the input - otherwise, Logisim mark the connection in red and I get no output value.
Is there an easy way to set up the initial value of a flip flop in Logisim, so that I avoid having to break the connection all the time, adding an input and then reconnecting output and input?

The problem was that I was using a D-flip flop designed manually. Using logisim built-in flipflops works perfectly.

Related

Is there a way to automatically feed a label after each print, then automatically backfeed that fed label before the next print in Zebra printers?

I apologize for the long title, but that is exactly what I am trying to achieve.
I'll try to explain more briefly here:
So I have a Zebra ZT610 with a scanner that checks every single label as they are printed. The problem is that we're trying to print labels solely, not in batch, and the issue with that is that the printed label will always be in a position where an operator will not be able to take the label without destroying it. The issue with this is it will become a waste of labels and ribbons if this process remains as is.
How it is now (it is not really in production, but to give you an imagination):
Operator clicks on print
Zebra prints a label (and the scanner checks the label simultaneously)
Operator feeds a label (in order to take the label without destroying it)
Operator takes the label
Repeat the process
That is the issue, in theory we would have to waste HALF of the amount of available labels (assuming that all printed labels passed the inspection) in order to finish the job, which is definitely absurd and no one in the world would do this hahah
What we're trying to achieve:
Operator clicks on print
Zebra prints a label (and the scanner checks the label simultaneously)
The printer feeds a label automatically (or maybe half of a label at least for the printed label to be taken without any issue or destroying it)
Operator takes the label
Operator prints another label
Printer backfeeds the latest fed label
Printer prints on the backfed label
Continue on from step 3, and so on.
I searched for anything related to this and all what i found was this:
^XA
^FD
^XZ
All it basically those is "print" a space on a label, thus technically feeding a label. But i was never able to get that label to go back inside the printer.
Thank you for reading this far.
EDIT:
We have also tried this:
Went into the printers settings via its IP address and login
Click on 'View and Modify Printer Settings'
Click on 'General Setup'
Below you will find 'Tear Off Adjust', we've set it to the maximum (120) but that was not enough, it is still too far inside.
But i hope the solution above helps other people out there.
Take a look at the ~JS command - Change Backfeed Sequence. By overriding the default backfeed, you can force the label media to feed forward after printing, then retract on the next print.
Not knowing how much backfeed you will need, start with 50% (~JS50) and adjust from there.

Highcharts line color based on other data than value

I have a set of data consisting of 3 values, being time, dataValue, dataQuality. I'm trying to get the line color (not the marker because that is working) color set based on the dataQuality. The current graph is rendered based on time (x-axis) and dataValue (y-axis) and dataQuality is currently not used or shown.
What I would like tot have is the line color based on the data quality instead of the data value, all while rendering data value for the line.
Is this possible to achieve within hightcharts?
Edit: To clarify with an image, as requested. The red line is the only line I'd like tot render, the grey one is here solely to show the quality value for the data. So what I'd like is the red line to go grey (or whatever we decide it to be) as soon as the data from the other line drops below a threshold. The markers, even though done with paint here, are already done by setting the color value for individual markers grammatically when processing the incoming data. The grey line should not be rendered at all.
Alright, having a night of sleep over it helped. Instead of trying to do it the hard way, by using invisible values I though of another way to solve this.
I do know the timestamps for low quality points. I started using the timestamps on the x-axis to create zones with different colors. Which color for which zone is determined by the data quality.

activating turn off switch when measured value is greater than constant (LabVIEW)

I am measuring a varying voltage value and when it exceeds some threshold, currently set at .25, as shown in the image, I want the power supply to be cut off.
I thought I could just use a 'greater than' comparison to activate the power off button but it does not seem to work.
Any wire on a LabVIEW diagram can only have one source. It can be wired to any number of inputs but only one output - otherwise, what should the value on the wire be, if the two outputs returned different values?
If you want to use the result of your comparison to activate the 'off' case, instead of the Off control, you'll have to either:
Disconnect the Off control and connect this wire to the output of the Greater Than comparison function instead, or
Insert an Or function in the wire and connect the output of the comparison to the unused input of the Or. That way the 'off' case will be activated if either the comparison is True, or the button is clicked.

How to clear the output in a cell in itorch notebook?

In itorch notebook, Is there a way to clear the output of a cell with code?
What I would like to do is to dynamically display the progress, like a loading bar.
The reason for this is when a lot of computation is involved, I would like to track how far the progress has gotten, and whether it froze or not.
So basically I would like to print the number of iteration I'm in in percentage form and overwrite it in the next iteration.
Any ideas?
You can use the carriage return character (\r) to overwrite the same line in a cell.
For example:
io.write("Hello") -- No newline
io.write("\rWorld")
just displays
World
You can use this to write several times the progress of your process, without adding multiple lines.

Lua script for iOS getColors within range?

I am trying to capture the pixel color of a specific letter in a font within an iOS app. I'd then use that color in an if/then statement to determine the next action of my script. I'm finding no easy way to determine if the color/colors I'm finding are the right ones. Here's my current process: I start recording my inputs and continuously click around the letter. I end up with something like touchdown(123,456). I change that to alert(getColor(123,456)) and run, which produces a popup that tells me the color such as 3094841 (not sure why the colors are in numeric format, but they are). I do this for each touchdown line that is captured. The problem is, I don't know an easy way to determine which color is the small letter I'm trying to tap.
Is there a lua function that will capture and display a range of colors between 2 points? If there were, I could see the commonality of all of the colors within the 2 points and make at least an educated guess as to which is the color in the font. Or even more useful - is there a tool I can use to type in the color I'm getting back and have it display the corresponding color, so I can compare them. That'd be the easiest. Hope this makes sense. Any help would be awesome. In case it matters, I'm using Autotouch 8 on an iPhone 5.
TIA
I use this function often in my games.
I find the easiest way to get a color you want to execute every single time is to take a snap of the screen you're checking and then use the helper on getColor(x, y)
And you can use this to alert your color.
local color = getColor(x, y)
alert(color)
-- You can also use:
log(color)--this one keeps it in your log in case you can write it down immediately.
To use this in an if/then statement
function = namedfunction()
local color = getColor(x, y)
if color == YOURCOLOR then
else
end
end
namedfunction();
Note that I have the iPhone 5 iOS 8.3 and I have the most recent AutoTouch from Cydia. If you don't have the helper when you're scripting it might be worth it to check if Cydia offers a capatable version.
Edit: I am running version 3.5.3-8 of Autotouch.

Resources