Can I Use powerpoint to send commands out the serial port?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm not a programmer, but have a decent brain. I want to send commands to a
RS232 controlled relay pack by actuating command buttons on a ppt screen. Is
there a simple code to send these commands? I have code for the relay pack
i.e...

MSComm1.Output = Chr$(254) 'enters command mode
MSComm1.Output = Chr$(9) 'turns off any relays
MSComm1.Output = Chr$(1) 'enters single relay-on mode
MSComm1.Output = Chr$(relay - 1) 'selects relay to activate

I'd also like to have the program repeat the relay off command after 15
seconds and wait for the next button activation.
 
Hmmm, simple? Not really but it is doable. You know, it might be simpler
than I first thought. You could write a small batch file that you activate
via a "Action Setting" and "Run Program".


Austin Myers
MS PowerPoint MVP Team

PowerPoint Video and PowerPoint Sound Solutions www.pfcmedia.com
 
Hello bradiger,

I did it in Excel, for how see below.
Should be identical in PPT.

I noticed that I had to close the file in order to get the data to be
sent. Hence the 'Close' statement.

If at all possible, to start with, I suggest using some device so that
you can monitor the serial output port and use simple text strings, not
just Chr() . It can be highly frustrating when you get no results.

Sub send_to_com1_motor4()
Open "Com1:9600,n,8,1" For Output As #1
'Print #1, Chr(128); Chr(0); Chr(9); Chr(33);
Close #1
End Sub

HTH,
Leef_me
 
I found an EXE file for my device and wrote several strings in DOS. I
created a batch file for each of the 29 buttons on my powerpoint slide. It
works well. I even inserted a Sleep comand to turn the relays off after 15
seconds. Not bad for a techie with absolutely no programming background or
experience. I couldn't have done it without the WEB and folks like yourself
to point me in the right direction.

Once again, the world is safe.

Now, for the side effects... Every time a batch file runs, the DOS screen
pops up until the command string is complete! Including the 15 second sleep
function!

Is there a way to keep the DOS screen invisible?
 
Going from memory here (it's been awhile since I played with DOS) I think
the first statement in your batch file should be "ECHO OFF".

DOS experts jump in here.

Austin Myers
MS PowerPoint MVP Team

PowerPoint Video and PowerPoint Sound Solutions www.pfcmedia.com
 
It should read
@echo off

--
<>Please post all follow-up questions/replies to the newsgroup<>
<><>Email unless specifically requested will not be opened<><>
<><><>Do Provide The Version Of PowerPoint You Are Using<><><>
<><><>Do Not Post Attachments In This Newsgroup<><><>
Michael Koerner [MS PPT MVP]


Going from memory here (it's been awhile since I played with DOS) I think
the first statement in your batch file should be "ECHO OFF".

DOS experts jump in here.

Austin Myers
MS PowerPoint MVP Team

PowerPoint Video and PowerPoint Sound Solutions www.pfcmedia.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top