GearHeads Corner
June 17, 2019, 05:38:44 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: 1 ... 15 16 [17] 18
  Print  
Author Topic: reading Pokeys pins  (Read 4017 times)
0 Members and 1 Guest are viewing this topic.
ArtF
Administrator
Hero Member
*****
Posts: 5280



View Profile
« Reply #240 on: May 28, 2019, 07:53:25 PM »

Gary:

  Yes, very possible. Myself and Yanvrno realized at some point the fonts were a bit
flakey due to some technical factors. I havent worked on them as we typically worked around
the problem by using designs that didnt screw up, I was worried about breaking existing panels
and screens. I will take a look this week though to see if I can update them to be a bit
safer. The system "tries" out a font sizing of the text and adjusts it to just fit in a window,
it some cases it can fail, Ill see if I can figure out why in this case. If I can fix it
without breaking predefine d screens Ill make a change.

Thx
Art
Logged
gburk
Full Member
***
Posts: 133


View Profile
« Reply #241 on: May 29, 2019, 03:32:38 PM »

art

ok thanks I can set the panel to resizable forget the exact command but that will work, guess it really won't matter to much with the screen panel for spindle
the main thing is I get it to work correct with the m3 seeing the g code will be calling it most of the time screen panel was there mostly for testing.. 
but won't know till I get the new controlle r..

gary
Logged
gburk
Full Member
***
Posts: 133


View Profile
« Reply #242 on: May 31, 2019, 11:00:46 AM »

Art

I think I seen you using a poscope in one of you video's..
How is it? is it worth the purchase. .

Gary
Logged
gburk
Full Member
***
Posts: 133


View Profile
« Reply #243 on: June 04, 2019, 01:52:02 PM »

Art

Got the new kb controlle r working on wiring it up a lot different than the old board hopefully I will get it right if not kaboom Angry
hoping to have it back in tomorrow and will see if auggie works I know I have the pokeys wired right now anyway..

Gary 
Logged
ArtF
Administrator
Hero Member
*****
Posts: 5280



View Profile
« Reply #244 on: June 06, 2019, 08:39:43 AM »

Gary:

 Never tried a PoScope. I have a  bench scope and a small pocket scope
thats usb I use in tight situation s, but I havent tried a PoScope.

  Ill keep cross my fingers crossed for you.

Art
Logged
gburk
Full Member
***
Posts: 133


View Profile
« Reply #245 on: June 06, 2019, 01:11:39 PM »

Art

I think you will be happy, I have the new kb wired up and tested it with auggie and the spindle is working m3 S it is changing the speeds ok and m5 shuts it down so will m3 s0.. I haven't tested what the RPM's are yet ended up needing a battery for my rpm reader.. will let you know in the next day or 2 how close it is compared to what I set it to with the m3 S code..

Also I am thinking of setting up CW and CCW spindle I have m4 working, my question is, I still have problems figuring out how to set pins from high to low.
Like if a wanted to control a relay not on board, I need to send 5+ to trigger the relay would SetPinDig GetPinDig be the proper way to read and write to the pin#?.
I know with the probe you have pin19 built into auggies config..

Ok I hooked up pin28 from the lcd 16pin plug and 5+, if I power on pokeys I get nothing from the pin no voltage if I set to 0 or 1 from auggie, now if I run the pokeys config I see the pin28 is set for digital out, but still no voltage change from auggie, but if I invert the pin in pokeys config it will start to work with auggie I can invert it again and still works I can close out the pokeys config and it works great, but if I power the pokeys off and back on its back to not working seems like I allways have to make a change to the pin in pokeys config for it to start working, Any thoughts on this?..


have you had a chance to check the g code m6 running when g code file first loaded..

Thanks gary 
« Last Edit: June 09, 2019, 06:47:20 PM by gburk » Logged
gburk
Full Member
***
Posts: 133


View Profile
« Reply #246 on: June 12, 2019, 12:58:59 PM »

Art

I think we have discussed this before dialogs.

anyway if I remember there is no way to read which button was pressed Ok or Cancel correct?

and if I create my own button, is there a way to close the dialog when button pressed?..

dialog doesn't seem to close endless you hit Ok Cancel or the X..

Thanks gary
Logged
ArtF
Administrator
Hero Member
*****
Posts: 5280



View Profile
« Reply #247 on: June 13, 2019, 12:56:37 PM »

Hi Gary:

 >>would SetPinDig GetPinDig be the proper way to read and write to the pin#?.

  Yes, Those should set any pin. I dont use any myself though, both my systems
are using the relays as the only output. But, on my test rig, I can turn on or off an LED
on a pin I set with those calls. Im not sure why you need to set it in pokeys though,
I dont. Did you tell the pokeys to save the config when you set it to digtial?
Is it still set to digital out when you next run Pokeys again?

  Last test I did , the M6 didnt run on load, I did add a kill for that but now
Im not sure if I released that version. I will check it and release a version
today or tomorrow just so we're sure. I turned off all macro calls during load
as a safety as I recall.

  As to the Dialog issue, I dont think you have much choice as it is implement ed,
the user has to press OK or cancel to exit and close the dialog. I will add a Close()
command for you today , call if from any script that dialog is calling from a button
or item.

  Should be out within a day or two..

Art
 


 
Logged
gburk
Full Member
***
Posts: 133


View Profile
« Reply #248 on: June 13, 2019, 03:23:00 PM »

Art

Some of my problem setting relays other than the 2 onboard is for some reason pokeys is outputtin g at least 1.6v from a pin before I trigger it..

for example if I use the LCD pin28  opps I forget if I had the other wire to gnd or +5 but anyway it would have 1.6v pin not triggered and for the relays I was using that was enough to trigger the relay on, so as soon as I powered pokeys the relay set if I triggered the relay it would jump to +5 so it was working.. I also tried the SSR output and I was getting the same voltage results..

The two onboard relays work fine, problem is I have 2 relays for power to the spindle m3 m4 and 2 for forward and 2 for reverse.. . SSR relays
I just ordered a couple DTDP I am going to try hopefully that will eliminate 2 relays..

I don't know to much about the oc1 2 3 4 outputs is it possible to use them?.

And a close() for the dialog would be great thenks

Gary 
Logged
ArtF
Administrator
Hero Member
*****
Posts: 5280



View Profile
« Reply #249 on: June 14, 2019, 01:16:22 PM »

Gary:

 New Auggie is online. It has a Close() command for dialogs
as a test, its untested as of yet.

  As to the voltages, that really sounds dodgy, if your connected to the
pokeys ground you should have 0 volts to the pin, or 5, but it may be your
requestin g too much current. The outputs are pretty low ma capabilit y
so wiring can count. Are you triggerin g with a transisto r circuit?

oc's should work, though I havent used them I dont think..

Art


Art
Logged
gburk
Full Member
***
Posts: 133


View Profile
« Reply #250 on: June 14, 2019, 02:57:16 PM »

Art

Thanks will test the close().

I'm not sure but sleep on it, and went back to testing voltage now the SSR is working fine 0 to 5v..

I think you may be right the pokeys may not be able to handle the voltage output to relays from the LCD pins.. I tested again and received 4.6v not connected to relay when I hooked up the relay it dropped to almost nothing and relay didn't trigger..

OC'S question are they PWM, I can turn them on but no voltage change.. would I need a PWN to voltage board?.

Tested the Close(), doesn't seem to work I may be using it wrong..
I created a global dialog
I also created a button call.
I press the button and it does call the function correct.
I put a ProbeLeng thDialog. Close(); in the function but doesn't close it..
I assume the only way I can close a dialog from another function is it has to be global..

There already was a Close statment in auggie before but not sure what it's use was intended for.


Thanks gary
« Last Edit: June 14, 2019, 03:22:39 PM by gburk » Logged
gburk
Full Member
***
Posts: 133


View Profile
« Reply #251 on: June 14, 2019, 08:13:10 PM »

Art

Did a test with the g code, I attached a copy..

It's still running the m6 t when g code first loaded, brings up my dialog and retracts to 1" but the g codel stays at the first line of the code.. first line is hi lighted.

gary

* XballscrewmountFinal6.zip (1.39 KB - downloaded 2 times.)
Logged
ArtF
Administrator
Hero Member
*****
Posts: 5280



View Profile
« Reply #252 on: June 15, 2019, 07:08:10 AM »

Gary:

   Thx, I had lost that file, Ill retest and fix the m6 start.. Ill check the close as well..

 >>I think you may be right the pokeys may not be able to handle the voltage output to relays from the LCD pins.. I tested again and received 4.6v not connected to relay when I hooked up the relay it dropped to almost nothing and relay didn't trigger..

   Yeah, there's not enough current to push a relay with a pinout, it has only enough for an
LED or signal , running an opto is one way to make it drive a relay.
 OC's are open collector outputs, they are like pins with opto's added so that you can draw
enough current for a relay for example.  You put 5 volts for example on one side of
a relay, and the other side can be hooked to an OC output. There are 4 OC's, and
you can script call them with  Pokeys.Se tOC( int oc, int state).

   Note: to do this you need to make sure whatever power supply is driving the relay
must share the same ground as the pokeys..

Art


   These 4 exist mainly to drive relays..

Be a day or two till I can test the M6.. Ill get back to you soon.

Art

 
Logged
ArtF
Administrator
Hero Member
*****
Posts: 5280



View Profile
« Reply #253 on: June 15, 2019, 07:16:45 AM »

Gary:

 Small correctio n. According to the manual the OC's are all
galvanica lly isolated from the pokeys. So each OC has its own
ground, OC- to be hooked to the ground of the supply driving the
relay from the OC+. The OC command basically if set to state:1
will short those pins OC+ and OC-. Current will flow from OC+ to OC-
when the they are shorted.

  You can think of it as a transisto r with the OC+ being the collector,
the OC- a grounded emitter, and the state is the base.
 So in short this would be an NPN transisto r with emitter ( OC-) to
be connected to your power ground and the collector (OC+) to
be connected to one side of the relay. The other side of the coil to
power supply +.

Art
 
supply grund, and the collector (OC+)
Logged
gburk
Full Member
***
Posts: 133


View Profile
« Reply #254 on: June 15, 2019, 06:11:29 PM »

Art

Thanks the oc's work wired up per your direction s and relay gos on and off..

Gary
Logged
Pages: 1 ... 15 16 [17] 18
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!